| [ << ] | [ < ] | [ Up ] | [ > ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
8.1 Strings
The class
String
cl_string
<cln/string.h>
implements immutable strings.
Strings are constructed through the following constructors:
cl_string (const char * s)Returns an immutable copy of the (zero-terminated) C string
s.cl_string (const char * ptr, unsigned long len)Returns an immutable copy of the
lencharacters atptr[0], …,ptr[len-1]. NUL characters are allowed.
The following functions are available on strings:
operator =Assignment from
cl_stringandconst char *.s.size()strlen(s)-
Returns the length of the string
s. s[i]-
Returns the
ith character of the strings.imust be in the range0 <= i < s.size(). bool equal (const cl_string& s1, const cl_string& s2)-
Compares two strings for equality. One of the arguments may also be a plain
const char *.
This document was generated on August 27, 2013 using texi2html 5.0.
