Part string of a character string.

Part string of a character string.

Name Type Default Description
Return char*   Substring. The result is only valid directly after the call. If it is to be used again it must be copied into a defined character string (strcpy, strcat, ...). The result will automatically be 0-terminated.
str char* - Whole character string
pos int - 0-based start position
len int -1 Length of the substring. If the length is larger than the whole string, only the existing part will be fetched (what else?). -1 : Whole string from start position
// Immediate use
showmessage ("Ma-%s-as", strsubstring ("Matthias", 2, 4));
// later use char str[512]; strcpy (str, strsubstring ("Matthias", 2, 4));

Since

Available
priint:comet InDesign® Plug-Ins, comet_pdf, Illustrator

Alphabetic index HTML hierarchy of classes or Java