Skip to main content

IAR Embedded Workbench for RH850 3.20.x

__toString

In this section:
Syntax
__toString(C_string, maxlength)
Parameters
C_string

Any null-terminated C string.

maxlength

The maximum length of the returned macro string.

Return value

Macro string.

For use with

All C-SPY drivers.

Description

This macro is used for converting C strings (char* or char[]) into macro strings.

Example

Assuming your application contains this definition:

char const * hptr = "Hello World!";

this macro call:

__toString(hptr, 5)

would return the macro string containing Hello.

See also

Macro strings.