Detailed Description
This group includes all functions used to create/convert ID objects.
Function Documentation
BOOL sat3_convertid_str |
( |
SAT_OBJECT |
cstr, |
|
|
char * |
string, |
|
|
int |
maxchars |
|
) |
| |
Extract a C-style string from a calculator ID.
Stores the string on a preallocated buffer and appends a null char at the end.
- Parameters:
-
cstr | Calculator string. |
string | Pointer to a preallocateed buffer that is to receive the string. |
maxchars | Size of the preallocated buffer. |
- Returns:
- TRUE if successful, FALSE otherwise. If the size of the ID is greater than the buffer size, the ID will be truncated at maxchars.
- See also:
- sat3_convertcstr_bytes sat3_convertcstr_substr sat3_idlen Object creation and manipulation
Create an ID object from a C-style string.
Create an ID object from the given string, without the ending null char.
- Parameters:
-
where | Defines where to allocate memory from. Can be one of the following constants: ALLOC_HEAP Allocates from the C-heap using malloc() ALLOC_TEMPOB Allocates memory from the TEMPOB calculator area or... it can be an element (SAT_OBJECT) within a composite object, (array, list or any other). |
string | Pointer to a null-terminated string. |
- Returns:
- SAT_OBJECT with the new string, or zero if it fails. When a SAT_OBJECT is given to the 'where' parameter, the same SAT_OBJECT is returned or 0 if error.
- See also:
- Object creation and manipulation
Get the number of characters in an ID.
- Parameters:
-
idnt | Variable name (ID object). |
- Returns:
- Number of characters in the given ID, or 0 if not an ID.