#include <string.hpp>
List of all members.
Friends
Detailed Description
- Examples:
-
string_test.cpp.
Definition at line 50 of file string.hpp.
Friends And Related Function Documentation
double as_double |
( |
const string & |
s | ) |
[friend] |
int as_int |
( |
const string & |
s | ) |
[friend] |
string as_string |
( |
long unsigned int |
i | ) |
[friend] |
string as_string |
( |
double |
x | ) |
[friend] |
string as_string |
( |
long long int |
i | ) |
[friend] |
string as_string |
( |
long long unsigned int |
i | ) |
[friend] |
string as_string |
( |
float |
x | ) |
[friend] |
string as_string |
( |
void * |
ptr | ) |
[friend] |
string as_string |
( |
short int |
i | ) |
[friend] |
string as_string |
( |
short unsigned int |
i | ) |
[friend] |
string as_string |
( |
int |
i | ) |
[friend] |
string as_string |
( |
unsigned int |
i | ) |
[friend] |
string as_string |
( |
long int |
i | ) |
[friend] |
string as_string_hexa |
( |
int |
i | ) |
[friend] |
Definition at line 138 of file string.hpp.
{
static char buf[16];
sprintf (buf, "%x", i);
return buf; }
bool busy |
( |
const string & |
s | ) |
[friend] |
Check whether s is non empty.
Definition at line 61 of file string.hpp.
{ return s.rep->n != 0; }
Definition at line 333 of file string.cpp.
{
register nat i, n= N(s);
string r (n);
for (i=0; i<n; i++) r.rep->a[i]= s.rep->a[i];
return r;
}
Definition at line 61 of file string.cpp.
{
register const char* a= S(s);
register nat i, h=0, n= N(s);
for (i=0; i<n; i++)
h= (h<<1) ^ (h<<9) ^ (h>>23) ^ ((nat) a[i]);
return h;
}
char* inside |
( |
const string & |
s, |
|
|
nat |
pos |
|
) |
| [friend] |
Return the length of s.
Definition at line 59 of file string.hpp.
Definition at line 382 of file string.cpp.
{
register nat i, n1=N(s1), n2=N(s2);
string r (n1 + n2);
for (i=0; i<n1; i++) r.rep->a[i ]= s1.rep->a[i];
for (i=0; i<n2; i++) r.rep->a[i+n1]= s2.rep->a[i];
return r;
}
char read |
( |
const string & |
s, |
|
|
nat |
i |
|
) |
| [friend] |
Return the i th character of s.
Definition at line 67 of file string.hpp.
char* S |
( |
string & |
s | ) |
[friend] |
Return a pointer to a copy of s.
Definition at line 63 of file string.hpp.
{ s.secure (); return s.rep->a; }
const char* S |
( |
const string & |
s | ) |
[friend] |
Return a const pointer to s.
Definition at line 65 of file string.hpp.
friend class string_rep [friend] |
Replace "\\n", "\\t", and "\\b" respectively by "\n", "\t", and "\b".
The documentation for this class was generated from the following files:
- /Users/mourrain/Devel/mmx/basix/include/basix/string.hpp
- /Users/mourrain/Devel/mmx/basix/src/string.cpp