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

Standard C cstring API functions. More...

Functions

variant StrToNum (string str)
 Convert string to number.
 
unsigned int StrLen (string str)
 Get string length.
 
byte StrIndex (string str, unsigned int idx)
 Extract a character from a string.
 
string NumToStr (variant num)
 Convert number to string.
 
string StrCat (string str1, string str2, string strN)
 Concatenate strings.
 
string SubStr (string str, unsigned int idx, unsigned int len)
 Extract a portion of a string.
 
string Flatten (variant num)
 Flatten a number to a string.
 
string StrReplace (string str, unsigned int idx, string strnew)
 Replace a portion of a string.
 
string FormatNum (string fmt, variant num)
 Format a number.
 
string FormatVal (string fmt, variant val)
 Format a value.
 
string FlattenVar (variant x)
 Flatten any data to a string.
 
int UnflattenVar (string str, variant &x)
 Unflatten a string into a data type.
 
int Pos (string Substr, string S)
 Find substring position.
 
string ByteArrayToStr (byte data[])
 Convert a byte array to a string.
 
void ByteArrayToStrEx (byte data[], string &str)
 Convert a byte array to a string.
 
void StrToByteArray (string str, byte &data[])
 Convert a string to a byte array.
 
string Copy (string str, unsigned int idx, unsigned int len)
 Copy a portion of a string.
 
string MidStr (string str, unsigned int idx, unsigned int len)
 Copy a portion from the middle of a string.
 
string RightStr (string str, unsigned int size)
 Copy a portion from the end of a string.
 
string LeftStr (string str, unsigned int size)
 Copy a portion from the start of a string.
 
int strlen (const string &str)
 Get string length.
 
string strcat (string &dest, const string &src)
 Concatenate strings.
 
string strncat (string &dest, const string &src, unsigned int num)
 Append characters from string.
 
string strcpy (string &dest, const string &src)
 Copy string.
 
string strncpy (string &dest, const string &src, unsigned int num)
 Copy characters from string.
 
int strcmp (const string &str1, const string &str2)
 Compare two strings.
 
int strncmp (const string &str1, const string &str2, unsigned int num)
 Compare characters of two strings.
 
void memcpy (variant dest, variant src, byte num)
 Copy memory.
 
void memmove (variant dest, variant src, byte num)
 Move memory.
 
char memcmp (variant ptr1, variant ptr2, byte num)
 Compare two blocks of memory.
 
unsigned long addressOf (variant data)
 Get the absolute address of a variable.
 
unsigned long reladdressOf (variant data)
 Get the relative address of a variable.
 
unsigned long addressOfEx (variant data, bool relative)
 Get the absolute or relative address of a variable.
 

Detailed Description

Standard C cstring API functions.