class Itk::SubString

class for string and substring of char.

継承:


public メンバ
[more]static SubString null
indicates null string

public メンバ関数
[more] SubString(const UInt size)
allocate new area of the size and construct a SubString
[more] SubString(char* h, char* t)
construct a SubString that has specified head and tail
[more] SubString(char* h, const UInt l)
construct a SubString that starts the specified head and has specified length
[more] SubString(char* str = ITK_NULLPTR)
construct a SubString of the specifiled c-string
[more] SubString(const SubString& src)
construct a copy of the specifiled SubString
[more] SubString(const SubString& src, const UInt hidx, const UInt tidx)
construct a SubString that is a sub-string of the original string, head and tail.
[more]SubString& operator= (const SubString& s)
set the value of the original SubString s.
[more]SubString& operator= (char* s)
set the value of the original char *s.
[more]SubString& operator= (const char * s)
set the value of the original char *s.
[more]Bool eq(const SubString& r) const
compare the head and tail pointer of the SubString
[more]Bool equal(const SubString& r) const
compare the contents of the SubString
[more]Bool operator== (const SubString& r) const
compare the contents of the SubString.
[more]Bool operator== (const char* ref) const
compare the contents of the SubString with c-string ref
[more]static Bool less(const SubString & str0, const SubString & str1)
compare the contents of two SubString
[more]static Bool greater(const SubString & str0, const SubString & str1)
compare the contents of two SubString
[more]static Bool lessequal(const SubString & str0, const SubString & str1)
compare the contents of two SubString
[more]static Bool greaterequal(const SubString & str0, const SubString & str1)
compare the contents of two SubString
[more]Bool operator<(const SubString & ref) const
compare the contents of two SubString
[more]Bool operator<=(const SubString & ref) const
compare the contents of two SubString
[more]Bool operator>(const SubString & ref) const
compare the contents of two SubString
[more]Bool operator>=(const SubString & ref) const
compare the contents of two SubString
[more]Bool operator<(const char* ref) const
compare the contents of two SubString
[more]Bool operator<=(const char* ref) const
compare the contents of two SubString
[more]Bool operator>(const char* ref) const
compare the contents of two SubString
[more]Bool operator>=(const char* ref) const
compare the contents of two SubString
[more]Bool isPrefixOf(const SubString& ref) const
check the SubString is a prefix of the specifiled SubString ref
[more]Bool isPrefixOf(const char* const ref) const
check the SubString is a prefix of the specifiled const char *ref
[more]Bool hasPrefix(const SubString& prefix) const
check the SubString has the specifiled prefix
[more]Bool hasPrefix(const char* const ref) const
check the SubString has the specifiled prefix
[more]Bool checkPopPrefix(const SubString & prefix)
check the prefix and pop it.
[more]Bool checkPopPrefix(const char * const prefix)
check the prefix and pop it
[more]Int index(const char c) const
check the existence of the char c in this SubString.
[more]Bool has(const char c) const
check the existence of the char c in this SubString.
[more]void set(char* h, char* t)
set head and tail pointer
[more]void set(char* h, const UInt l)
set head and the length
[more]void set(char* str = ITK_NULLPTR)
set the head and tail by char* str
[more]void set(const char * str)
set the head and tail by const char* str.
[more]void set(const SubString& src)
set the head and tail by SubString.
[more]void set(const SubString& src, const UInt hidx, const UInt tidx)
set the head and tail by SubString offseted by hidx and tidx.
[more]void set(const SubString& src, const UInt hidx)
set the head and tail by SubString offseted by hidx.
[more]void setNull()
set this SubString to the null string.
[more]Bool isNullPtr() const
check the head of this SubString is null pointer.
[more]Bool alloc(const UInt l, Bool forcep = True)
allocate the area of the length l.
[more]UInt length() const
get the length of this SubString.
[more]UInt size() const
get the size of this SubString.
[more]void setLength(const UInt l)
set the length of this SubString.
[more]UInt strlength() const
return strlen() value of this SubString
[more]void adjustLength()
adjust the length of this SubString to be strlen(head)
[more]Bool copy(const SubString& src, Bool allocp = False)
copy the content from src SubString.
[more]Bool copy(char* h, char* t, Bool allocp = False)
copy the content from c-string between char *h and *t.
[more]Bool copy(const char * h, const char * t = ITK_NULLPTR)
copy the content from c-string between char *h and *t.
[more]SubString dup() const
duplicate this SubString.
[more]char* strdup() const
duplicate this SubString.
[more]Bool copyTo(char* dst, Int maxlen = -1) const
copy the content of this SubString to the dst.
[more] operator char* () const
convert this SubString to c-str
[more]void terminate()
terminate the tail.
[more]Bool terminatedp() const
check this SubString is terminated.
[more]Bool isTerminated() const
check this SubString is terminated.
[more]Bool isNullStr() const
check this SubString is null string.
[more]char& first() const
return the first char
[more]char& last() const
return the last (tail-1) char
[more]Bool isFirst(const char c) const
check the first character of this SubString is c
[more]Bool tailp() const
if the head is equal or after the tail.
[more]Bool nullp() const
if the head is equal or after the tail.
[more]char popChar()
get the first char and shift the head
[more]char getChar()
get the first char and shift the head.
[more]void chop()
chop the tail
[more]void ungetChar()
unshift the head
[more]void ignoreChar()
ignore the first char and shift the head
[more]Bool skipNChar(UInt n = 1)
ignore N chars and shift the head
[more]UInt skipWhile(const SubString & charlist)
skip during the characters are in char list
[more]UInt skipUntil(const SubString & charlist)
skip until the characters are in char list
[more]SubString sub(UInt length) const
get a substring of the length.
[more]SubString sub(UInt offset, UInt length) const
get a substring of the specifiled offset and length
[more]SubString popSubString(UInt length)
pop a SubString of the length from the head of this SubString.
[more]SubString popSubString(UInt offset, UInt length)
pop a SubString of the length from the offset of this SubString.
[more]SubString shiftedSubString(UInt offset) const
get a SubString of the length from the tail of this SubString
[more]void pushChar(const char c)
push a char c before the head, and shift
[more]void putChar(const char c)
put a char c after the tail
[more]void put(const SubString& str)
put str SubString after the tail
[more]void put(const char* str)
put str char* after the tail
[more]void put(const char* str, UInt len)
put str char* (with length len) after the tail
[more]Int printf(const char * format, ...)
printf values into this SubString using the format
[more]Int printf1(const char* format)
printf the format (just a c-string) into this SubString
[more]Int printf1(const char* format, const char * x)
printf char* values into this SubString using the format
[more]Int printf1(const char* format, Int x)
printf Int values into this SubString using the format
[more]Int printf1(const char* format, UInt x)
printf UInt values into this SubString using the format
[more]Int printf1(const char* format, Flt x)
printf Flt values into this SubString using the format
[more]SubString append(const SubString & rest) const
append a SubString rest into this SubString
[more]SubString operator+ (const SubString & rest) const
same as append
[more]SubString operator+ (const char* rest) const
same as append
[more]SubString scanInCharSet(const SubString & charSet)
scan this SubString using charSet.
[more]SubString scanInCharSet(char * const charSet)
scan this SubString using charSet
[more]Bool skipInCharSet(const SubString & charSet)
skip this SubString using charSet.
[more]Bool skipInCharSet(char * const charSet)
skip this SubString using charSet
[more]SubString scanByDelimiter(const SubString & delimiter)
scan this SubString until one of delimiter appears.
[more]SubString scanByDelimiter(char * const delimiter)
scan this SubString until one of delimiter appears
[more]Flt scanAsFlt()
scan this SubString as Flt value.
[more]Int scanAsInt()
scan this SubString as Int value.
[more]UInt scanAsUInt()
scan this SubString as UInt value.
[more]Bool popIntVal(Int& i)
pop one Int value from this SubString
[more]Bool popUIntVal(UInt& i)
pop one UInt value from this SubString
[more]Bool popFloatVal(Flt& v)
pop one Flt value from this SubString
[more]void describe(ostream& o, Bool detailp = True) const
describe this SubString


文書

class for string and substring of char. The class include head and tail pointer of the string.
ostatic SubString null
indicates null string

o SubString(const UInt size)
allocate new area of the size and construct a SubString

o SubString(char* h, char* t)
construct a SubString that has specified head and tail

o SubString(char* h, const UInt l)
construct a SubString that starts the specified head and has specified length

o SubString(char* str = ITK_NULLPTR)
construct a SubString of the specifiled c-string

o SubString(const SubString& src)
construct a copy of the specifiled SubString

o SubString(const SubString& src, const UInt hidx, const UInt tidx)
construct a SubString that is a sub-string of the original string, head and tail.

oSubString& operator= (const SubString& s)
set the value of the original SubString s. see (set(const SubString &)).

oSubString& operator= (char* s)
set the value of the original char *s. see (set(char* s)).

oSubString& operator= (const char * s)
set the value of the original char *s. see (set(const char* s)).

oBool eq(const SubString& r) const
compare the head and tail pointer of the SubString

oBool equal(const SubString& r) const
compare the contents of the SubString

oBool operator== (const SubString& r) const
compare the contents of the SubString. (see equal(const SubString&r))

oBool operator== (const char* ref) const
compare the contents of the SubString with c-string ref

ostatic Bool less(const SubString & str0, const SubString & str1)
compare the contents of two SubString

ostatic Bool greater(const SubString & str0, const SubString & str1)
compare the contents of two SubString

ostatic Bool lessequal(const SubString & str0, const SubString & str1)
compare the contents of two SubString

ostatic Bool greaterequal(const SubString & str0, const SubString & str1)
compare the contents of two SubString

oBool operator<(const SubString & ref) const
compare the contents of two SubString

oBool operator<=(const SubString & ref) const
compare the contents of two SubString

oBool operator>(const SubString & ref) const
compare the contents of two SubString

oBool operator>=(const SubString & ref) const
compare the contents of two SubString

oBool operator<(const char* ref) const
compare the contents of two SubString

oBool operator<=(const char* ref) const
compare the contents of two SubString

oBool operator>(const char* ref) const
compare the contents of two SubString

oBool operator>=(const char* ref) const
compare the contents of two SubString

oBool isPrefixOf(const SubString& ref) const
check the SubString is a prefix of the specifiled SubString ref

oBool isPrefixOf(const char* const ref) const
check the SubString is a prefix of the specifiled const char *ref

oBool hasPrefix(const SubString& prefix) const
check the SubString has the specifiled prefix

oBool hasPrefix(const char* const ref) const
check the SubString has the specifiled prefix

oBool checkPopPrefix(const SubString & prefix)
check the prefix and pop it.

If this SubString begins the specified prefix, then pop the prefix part and move the head pointer to the next of it.

oBool checkPopPrefix(const char * const prefix)
check the prefix and pop it

oInt index(const char c) const
check the existence of the char c in this SubString.

It returns the position of the first c from the head pointer. If the char does not exist, it returns -1.

oBool has(const char c) const
check the existence of the char c in this SubString.

It returns Bool value instead of index value.

ovoid set(char* h, char* t)
set head and tail pointer

ovoid set(char* h, const UInt l)
set head and the length

ovoid set(char* str = ITK_NULLPTR)
set the head and tail by char* str

ovoid set(const char * str)
set the head and tail by const char* str.

It allocates the new area and copy contents from the str.

ovoid set(const SubString& src)
set the head and tail by SubString.

After this operation, this SubString and the src SubString share the same head and tail pointer.

ovoid set(const SubString& src, const UInt hidx, const UInt tidx)
set the head and tail by SubString offseted by hidx and tidx.

After this operation, this SubString becomes a substring of the src SubString.

ovoid set(const SubString& src, const UInt hidx)
set the head and tail by SubString offseted by hidx.

After this operation, this SubString becomes a substring of the src SubString. In this case, tails of both SubStrings are the same.

ovoid setNull()
set this SubString to the null string.

The null string is that both of head and tail are the null pointer.

oBool isNullPtr() const
check the head of this SubString is null pointer.

(see isNullStr()).

oBool alloc(const UInt l, Bool forcep = True)
allocate the area of the length l.

If forcep==True, then it allocates new are even if this SubString already has the enough space.

oUInt length() const
get the length of this SubString.

It is same as (tail-head).

oUInt size() const
get the size of this SubString.

It is the same as length()+1. But, this is not safe that the SubString is not allocated by null-terminated c-string.

ovoid setLength(const UInt l)
set the length of this SubString.

It changes tail pointer to be head+1.

oUInt strlength() const
return strlen() value of this SubString

ovoid adjustLength()
adjust the length of this SubString to be strlen(head)

oBool copy(const SubString& src, Bool allocp = False)
copy the content from src SubString.

If allocp==True, then it allocates the new area.

oBool copy(char* h, char* t, Bool allocp = False)
copy the content from c-string between char *h and *t.

If allocp==True, then it allocates the new area.

oBool copy(const char * h, const char * t = ITK_NULLPTR)
copy the content from c-string between char *h and *t.

If t==null, then it copy until the null character appear.

oSubString dup() const
duplicate this SubString.

It create a new SubString and copy the contents of this SubString.

ochar* strdup() const
duplicate this SubString.

It create a new c-string and copy the contents of this SubString.

oBool copyTo(char* dst, Int maxlen = -1) const
copy the content of this SubString to the dst.

If maxlen is specified, then it copy maxlen characters in maximum.

o operator char* () const
convert this SubString to c-str

ovoid terminate()
terminate the tail.

It put the null char to the tail.

oBool terminatedp() const
check this SubString is terminated. (see isTerminated()).

oBool isTerminated() const
check this SubString is terminated.

It checks the SubString contains the null character.

oBool isNullStr() const
check this SubString is null string.

It returns True if this SubString's head and tail is the same.

ochar& first() const
return the first char

ochar& last() const
return the last (tail-1) char

oBool isFirst(const char c) const
check the first character of this SubString is c

oBool tailp() const
if the head is equal or after the tail.

It is useful for checking overrun as a buffer.

oBool nullp() const
if the head is equal or after the tail. (same as tailp()).

ochar popChar()
get the first char and shift the head

ochar getChar()
get the first char and shift the head. (same as popChar()).

ovoid chop()
chop the tail

ovoid ungetChar()
unshift the head

ovoid ignoreChar()
ignore the first char and shift the head

oBool skipNChar(UInt n = 1)
ignore N chars and shift the head

oUInt skipWhile(const SubString & charlist)
skip during the characters are in char list

oUInt skipUntil(const SubString & charlist)
skip until the characters are in char list

oSubString sub(UInt length) const
get a substring of the length.

It returns a substring that starts the head and has the length.

oSubString sub(UInt offset, UInt length) const
get a substring of the specifiled offset and length

oSubString popSubString(UInt length)
pop a SubString of the length from the head of this SubString.

It shift the head pointer to the tail of the popped SubString.

oSubString popSubString(UInt offset, UInt length)
pop a SubString of the length from the offset of this SubString.

It shift the head pointer to the tail of the popped SubString.

oSubString shiftedSubString(UInt offset) const
get a SubString of the length from the tail of this SubString

ovoid pushChar(const char c)
push a char c before the head, and shift

ovoid putChar(const char c)
put a char c after the tail

ovoid put(const SubString& str)
put str SubString after the tail

ovoid put(const char* str)
put str char* after the tail

ovoid put(const char* str, UInt len)
put str char* (with length len) after the tail

oInt printf(const char * format, ...)
printf values into this SubString using the format

oInt printf1(const char* format)
printf the format (just a c-string) into this SubString

oInt printf1(const char* format, const char * x)
printf char* values into this SubString using the format

oInt printf1(const char* format, Int x)
printf Int values into this SubString using the format

oInt printf1(const char* format, UInt x)
printf UInt values into this SubString using the format

oInt printf1(const char* format, Flt x)
printf Flt values into this SubString using the format

oSubString append(const SubString & rest) const
append a SubString rest into this SubString

oSubString operator+ (const SubString & rest) const
same as append

oSubString operator+ (const char* rest) const
same as append

oSubString scanInCharSet(const SubString & charSet)
scan this SubString using charSet.

It return a SubString from the head that contain only the charSet.

oSubString scanInCharSet(char * const charSet)
scan this SubString using charSet

oBool skipInCharSet(const SubString & charSet)
skip this SubString using charSet.

It returns True if it skips at least one character.

oBool skipInCharSet(char * const charSet)
skip this SubString using charSet

oSubString scanByDelimiter(const SubString & delimiter)
scan this SubString until one of delimiter appears.

It returns a SubString until the delimiter.

oSubString scanByDelimiter(char * const delimiter)
scan this SubString until one of delimiter appears

oFlt scanAsFlt()
scan this SubString as Flt value.

It shift the head after the scanned string.

oInt scanAsInt()
scan this SubString as Int value.

It shift the head after the scanned string.

oUInt scanAsUInt()
scan this SubString as UInt value.

It shift the head after the scanned string.

oBool popIntVal(Int& i)
pop one Int value from this SubString

oBool popUIntVal(UInt& i)
pop one UInt value from this SubString

oBool popFloatVal(Flt& v)
pop one Flt value from this SubString

ovoid describe(ostream& o, Bool detailp = True) const
describe this SubString


直接の子クラス :
Buffer

Alphabetic index HTML クラス階層 or Java



このページは、DOC++により生成されています