IDA SDK

- Main Page
- Header Files
- Classes
- Modules

Modules | Classes | Functions
Functions: strings

## Detailed Description

functions that manipulate strings

## Modules
| Functions: string conversion
| functions that convert between string encodings

## Classes
struct | strarray_t
| Map strings to integer values - see strarray() More...

## Functions
idaman THREAD_SAFE char *ida_export | add_spaces (char *str, size_t bufsize, ssize_t len)
| Add space characters to the colored string so that its length will be at least 'len' characters. More...
idaman THREAD_SAFE char *ida_export | trim (char *str)
| Remove trailing space characters from a string. More...
idaman THREAD_SAFE const char *ida_export | skipSpaces (const char *ptr)
| Skip whitespaces in the string. More...
char * | skipSpaces (char *ptr)
idaman THREAD_SAFE const char *ida_export | strarray (const strarray_t *array, size_t array_size, int code)
| Find a line with the specified code in the strarray_t array. More...
idaman THREAD_SAFE void ida_export | entab (char *string)
| Convert whitespace to tabulations. More...

## Function Documentation

idaman THREAD_SAFE char* ida_export add_spaces | ( | char * | str,
|  | size_t | bufsize,
|  | ssize_t | len
| ) |  |

Add space characters to the colored string so that its length will be at least 'len' characters.

Don't trim the string if it is longer than 'len'.

Parameters

  str | pointer to colored string to modify (may not be NULL)
  bufsize | size of the buffer with the string
  len | the desired length of the string

Returns
  pointer to the end of input string

idaman THREAD_SAFE char* ida_export trim | ( | char * | str | ) |

Remove trailing space characters from a string.

Parameters

  str | pointer to string to modify (may be NULL)

Returns
  pointer to input string

idaman THREAD_SAFE const char* ida_export skipSpaces | ( | const char * | ptr | ) |

Skip whitespaces in the string.

Returns
  pointer to first non-whitespace char in given string

char* skipSpaces | ( | char * | ptr | ) |
| inline

Parameters

  ptr |

Returns
  pointer to first non-whitespace char in given string

idaman THREAD_SAFE const char* ida_export strarray | ( | const strarray_t * | array,
|  | size_t | array_size,
|  | int | code
| ) |  |

Find a line with the specified code in the strarray_t array.

If the last element of the array has code==0 then it is considered as the default entry.
If no default entry exists and the code is not found, strarray() returns "".

idaman THREAD_SAFE void ida_export entab | ( | char * | string | ) |

Convert whitespace to tabulations.

This function will stop the conversion as soon as a string or character constant is encountered.