
| Args: | |||
| _ size | : length of allocated Strg | ||
| Returns: | |||
| _ NULL | : if no memory was available | ||
| else a new Strg object, with length 'size', and filled with '\0' chars. | |||
| Errors: | |||
| _ EINVAL | : if a NULL was passed as argument | ||
| _ ENOMEM | : if no memory was available | ||
| Args: | |||
| _ str | : Strg object to copy | ||
| Returns: | |||
| _ NULL | : if no memory was available | ||
| else a complete copy of 'str'. | |||
| Errors: | |||
| _ EINVAL | : if a NULL Strg was passed as argument | ||
| _ ENOMEM | : if no memory was available | ||
| Note: | |||
| XCLE_StrgCopy and XCLE_StrgClone do exactly the same thing. | |||
| Args: | |||
| _ str | : Strg object to clone | ||
| Returns: | |||
| _ NULL | : if no memory was available | ||
| else a complete copy of 'str'. | |||
| Errors: | |||
| _ EINVAL | : if a NULL Strg was passed as argument | ||
| _ ENOMEM | : if no memory was available | ||
| Note: | |||
| XCLE_StrgCopy and XCLE_StrgClone do exactly the same thing. | |||
| Args: | |||
| _ str | : Strg object to free | ||
| Args: | |||
| _ chs | : character string to initialize the object from | ||
| Returns: | |||
| _ NULL | : if no memory was available or 'chs' was NULL. | ||
| else a Strg object with the same characters as 'chs'. | |||
| Errors: | |||
| _ EINVAL | : if a NULL string was passed as argument | ||
| _ ENOMEM | : if no memory was available | ||
| Args: | |||
| _ str | : Strg object to query | ||
| Returns: | |||
| -1 : if 'str' was NULL | |||
| else the Strg length. | |||
| Errors: | |||
| _ EINVAL | : if a NULL Strg was passed as argument | ||
| _ ENOMEM | : if no memory was available | ||
| Args: | |||
| _ str1 | : first part of the concatenated string | ||
| _ str2 | : last part of the concatenated string | ||
| Returns: | |||
| _ NULL | : if no memory was available | ||
| else the concatenation. | |||
| Errors: | |||
| _ EINVAL | : if a NULL Strg was passed as argument | ||
| _ ENOMEM | : if no memory was available | ||
| Args: | |||
| _ str | : Strg object to cut from | ||
| _ beg | : index of first character of extracted part (beginning at 0) | ||
| _ end | : index of first character after extracted part | ||
| Returns: | |||
| _ NULL | : if no memory was available, or 'beg' > 'end' | ||
| a new Strg made form the extracted section. | |||
| Errors: | |||
| _ EINVAL | : if a NULL Strg was passed as argument | ||
| _ ENOMEM | : if no memory was available | ||
| Args: | |||
| _ str | : Strg object to compare | ||
| _ strw | : reference Strg object | ||
| Returns: | |||
| _ -1 | : if a NULL Strg was passed as argument | ||
| _ 0 | : if the two Strg were different | ||
| _ +1 | : if the two Strg were equal | ||
| Errors: | |||
| _ EINVAL | : if a NULL Strg was passed as argument | ||
| _ ENOMEM | : if no memory was available | ||
| Args: | |||
| _ str | : Strg to copy | ||
| _ out | : output character string | ||
| _ max | : maximum number of characters to write | ||
| Returns: | |||
| _ -1 | : if no memory was available, a NULL Strg or character string was passed | ||
| else the number of character written. | |||
| Errors: | |||
| _ EINVAL | : if a NULL Strg or character string was passed as argument | ||
| _ ENOMEM | : if no memory was available | ||
| Note: | |||
| This method is distinct from XCLE_StrgOut in that it does not output a representation | |||
| of the Strg as an object (i.e. with quotes, and special characters escaped) but the | |||
| exact string buffer contents. | |||