ARDUINO 328 Functions Strings
From ROBOTC API Guide
Functions and Variables → Strings
| For information about displaying on the VEX LCD, please see the article: Display.
The number before the decimal is how many digits before the decimal you wish to display, while the number after the decimal is how many digits after the decimal you wish to display. So "%1.2f" tells us to display one digit before the decimal and two digits after the decimal, with "3.14" as the final result. |
|
| |||||||
strcat
| void strcat(void &pToBuffer, const void &pFromBuffer) | |||||||||
| (void) Function concatenates pFromBuffer onto end of pToBuffer. The variables are arrays of bytes terminated with zero character. It is user responsibility to ensure that the 'To' array is large enough to hold the result. ROBOTC is not able to do any range checking! Identical to the function found in conventional C 'string.h' library. | |||||||||
| |||||||||
|
strcmp
| short strcmp(void &pString1, const void &pString2) | |||||||||
| (short) Function compares pString1 with pString2. Returns negative value if less than, 0 if equal and positive value if greater than. The variables are arrays of bytes terminated with a zero char. Identical to the function found in conventional C 'string.h' library. | |||||||||
| |||||||||
|
strcpy
| void strcpy(void &pToBuffer, const void &pFromBuffer) | |||||||||
| (void) Function copies pFromBuffer to pToBuffer. The variables are arrays of bytes terminated with a zero character. It is user responsibility to ensure that the 'To' array is large enough to hold the result. ROBOTC is not able to do any range checking! Identical to the function found in conventional C 'string.h' library. | |||||||||
| |||||||||
|
StringDelete
| void StringDelete(string &sDest, const int nIndex, const int nSize) | ||||||||||||
| (void) Deletes a substring from a string. | ||||||||||||
| ||||||||||||
|
StringFind
| int StringFind(const string &sSrce, const string &sSearch) | |||||||||
| (int) Finds the position in a string of the selected substring. | |||||||||
| |||||||||
|
StringFormat
| void StringFormat(string &sDest, const string sFormatString, ...) | |||||||||
| (void) Formats a string using the specified format-string. | |||||||||
| |||||||||
|
StringFromChars
| void StringFromChars(string &sToString, const char &FromChars) | |||||||||
| (void) Converts an array of bytes to a string value. You MUST end your char array with a char value of zero! | |||||||||
| |||||||||
|
strncat
| void strncat(void &pToBuffer, const void &pFromBuffer, const short nMaxBufferSize) | ||||||||||||
| (void) Function concatenates pFromBuffer onto end of pToBuffer. The variables are arrays of bytes terminated with a zero character. nMaxBufferSize is the maximum size of ‘pFromBuffer’ and is usually created with a sizeof(..) function call. Identical to the function found in conventional C 'string.h' library file. | ||||||||||||
| ||||||||||||
|
strncmp
| short strncmp(void &pString1, const void &pString2, const short nMaxBufferSize) | ||||||||||||
| (short) Function compares pString1 with pString2. Returns negative value if less than, 0 if equal and positive value if greater than. The variables are arrays of bytes terminated with a zero char. nMaxBufferSize is the maximum number of bytes to compare and is usually created with a sizeof(..) function call. Identical to the function found in conventional C 'string.h' | ||||||||||||
| ||||||||||||
|