NXC  Version 1.2.1 r5
 All Data Structures Files Functions Variables Groups Pages

This is an example of how to use the cstring API functions: strcat, strcmp, strcpy, strlen, strncat, strncmp, strncpy, memcpy, memmove, and memcmp.

task main()
inline variant StrToNum(string str);
inline unsigned int StrLen(string str);
inline byte StrIndex(string str, unsigned int idx);
inline string NumToStr(variant num);
inline string StrCat(string str1, string str2, string str3, string strN);
inline string SubStr(string str, unsigned int idx, unsigned int len);
inline string Flatten(variant num);
inline string StrReplace(string str, unsigned int idx, string strnew);
inline string FormatNum(string fmt, variant number);
inline string FlattenVar(variant x);
inline int UnflattenVar(string str, variant & variable);
inline string ByteArrayToStr(byte data[]);
inline void ByteArrayToStrEx(byte data[], string & str);
inline void StrToByteArray(string str, byte & data[]);
strcat(string & dest, const string & src)
strcmp(const string & str1, const string & str2)
strcpy(string & dest, const string & src)
strlen(const string & str)
strncat(string & dest, const string & src, const int num)
strncmp(const string & str1, const string & str2, unsigned int num)
strncpy(string & dest, const string & src, const int num)