Pyro higlevel API
|
String manipulation class. More...
Public Types | |
enum | { npos = -1 } |
typedef std::string::iterator | iterator |
typedef std::string::const_iterator | const_iterator |
Public Member Functions | |
String () | |
String (int nLen, char nFiller) | |
String (const char *pzString) | |
String (const char *pzString, int nLen) | |
String (const std::string &cString) | |
String (const std::string &cString, int nPos, int nLen) | |
String (const String &cString) | |
String (const String &cString, int nPos, int nLen) | |
String (const_iterator cBegin, const_iterator cEnd) | |
size_t | Length () const |
size_t | CountChars () const |
String & | Resize (int nNewLen) |
String & | Format (const char *pzFormat, va_list pArgs) |
String & | Format (const char *pzFormat,...) |
String & | Strip () |
String & | LStrip () |
String & | RStrip () |
String & | Lower () |
String & | Upper () |
int | Compare (const char *pzString) const |
int | Compare (const std::string &cOther) const |
int | Compare (const String &cOther) const |
int | CompareNoCase (const char *pzString) const |
int | CompareNoCase (const std::string &cOther) const |
int | CompareNoCase (const String &cOther) const |
String & | operator= (const char *pzString) |
String & | operator= (const std::string &cString) |
String & | operator= (const String &cString) |
String & | operator+= (const char *pzString) |
String & | operator+= (const char nChar) |
String & | operator+= (const std::string &cString) |
String & | operator+= (const String &cString) |
String | operator+ (const char *pzString) const |
String | operator+ (const char nChar) const |
String | operator+ (const std::string &cString) const |
String | operator+ (const String &cString) const |
bool | operator== (const char *pzString) const |
bool | operator== (const std::string &cString) const |
bool | operator== (const String &cString) const |
bool | operator!= (const char *pzString) const |
bool | operator!= (const std::string &cString) const |
bool | operator!= (const String &cString) const |
bool | operator< (const char *pzString) const |
bool | operator< (const std::string &cString) const |
bool | operator< (const String &cString) const |
bool | operator> (const char *pzString) const |
bool | operator> (const std::string &cString) const |
bool | operator> (const String &cString) const |
char | operator[] (size_t nPos) const |
char & | operator[] (size_t nPos) |
operator const std::string & () const | |
std::string & | str () |
const std::string & | const_str () const |
const char * | c_str () const |
iterator | begin () |
iterator | end () |
const_iterator | begin () const |
const_iterator | end () const |
size_t | size () const |
bool | empty () const |
void | resize (size_t nLen) |
void | resize (size_t nLen, char nFiller) |
void | reserve (size_t nLen) |
String & | erase (size_t nPos=0, size_t nLen=npos) |
iterator | erase (iterator i) |
iterator | erase (iterator cFirst, iterator cLast) |
String | substr (size_t nPos=0, size_t nLen=npos) const |
size_t | find (const String &cStr, size_t nPos=0) const |
It use an std::string object for storage so casting an os::String to a std::string referrence is very efficient. It simply return a reference to the internal std::string.
typedef std::string::const_iterator os::String::const_iterator |
typedef std::string::iterator os::String::iterator |
String::String | ( | ) |
String::String | ( | int | nLen, |
char | nFiller | ||
) |
String::String | ( | const char * | pzString | ) |
String::String | ( | const char * | pzString, |
int | nLen | ||
) |
String::String | ( | const std::string & | cString | ) |
String::String | ( | const std::string & | cString, |
int | nPos, | ||
int | nLen | ||
) |
String::String | ( | const String & | cString | ) |
String::String | ( | const String & | cString, |
int | nPos, | ||
int | nLen | ||
) |
String::String | ( | const_iterator | cBegin, |
const_iterator | cEnd | ||
) |
String::iterator String::begin | ( | ) |
String::const_iterator String::begin | ( | ) | const |
const char * String::c_str | ( | ) | const |
Referenced by os::LayoutNode::AddChild(), os::Message::AddString(), os::Path::Append(), os::Clipboard::Commit(), os::RegExp::Compile(), os::SymLink::ConstructPath(), os::Directory::CreateDirectory(), os::Directory::CreateFile(), os::Settings::Private::CreatePath(), os::Resources::CreateResource(), os::Directory::CreateSymlink(), os::Directory::Delete(), os::FileReference::Delete(), os::IconDirectoryView::DragSelection(), os::View::DrawSelectedText(), os::View::DrawString(), os::View::DrawText(), os::FileReference::FileReference(), os::FileRequester::FileRequester(), os::Looper::FindHandler(), os::Font::Flatten(), os::Font::Font(), os::Spinner::FormatString(), os::FSNode::FSNode(), os::Settings::Private::GetAppName(), os::TextEdit::GetCharPosX(), os::Clipboard::GetData(), os::View::GetFontHeight(), os::TextEdit::GetPixelPosX(), os::PopupMenu::GetPreferredSize(), os::Slider::GetProgressString(), os::View::GetSelection(), os::FileReference::GetStat(), os::View::GetStringLength(), os::Font::GetStringLength(), os::View::GetStringLengths(), os::View::GetStringWidth(), os::Font::GetStringWidth(), os::View::GetStringWidths(), os::View::GetTextExtent(), os::Font::GetTextExtent(), os::TextEdit::HandleKeyDown(), os::FileRequester::HandleMessage(), os::IconDirectoryView::HandleMessage(), InfoWin::HandleMessage(), HandlerSelector::HandleMessage(), HandlerSelector::HandlerSelector(), os::Locale::Private::Init(), os::IconDirectoryView::Invoked(), os::RegistrarManager::Launch(), os::InputBox::Private::Layout(), os::TranslatorFactory::LoadAll(), os::RegExp::Match(), MountDialogWin::Mount(), os::IconDirectoryView::MouseMove(), os::IconDirectoryView::MouseUp(), NewDirWin::NewDirWin(), OperationCopyFile(), os::Font::operator=(), os::PopupMenu::Paint(), os::OptionParser::ParseOptions(), os::OptionParser::PrintHelpText(), os::FSNode::ReadAttr(), os::TextEdit::Redo(), os::RegistrarManager::RegisterTypeIconFromRes(), os::FSNode::RemoveAttr(), os::FileReference::Rename(), RenameFileWin::RenameFileWin(), os::Slider::RenderLabels(), os::Looper::Run(), MountDialogScanner::ScanPath(), os::RegExp::Search(), os::Application::SetCatalog(), os::DropdownMenu::SetCurrentString(), os::DateTime::SetDate(), os::ShortcutKey::SetFromLabel(), os::InputBox::Private::SetInputText(), os::Looper::SetName(), os::FileRequester::SetPath(), os::IconDirectoryView::SetPath(), os::Font::SetProperties(), os::Variant::SetString(), os::Settings::SetString(), os::Window::SetTitle(), os::Path::SetTo(), os::FSNode::SetTo(), os::View::SetToolTip(), os::TextView::SetValue(), os::ShortcutKey::ShortcutKey(), os::FSNode::StatAttr(), os::TempFile::TempFile(), os::TextEdit::Undo(), os::TempFile::Unlink(), UnmountThread(), os::CalendarView::Update(), os::Variant::Variant(), os::FSNode::WriteAttr(), and os::TempFile::~TempFile().
int String::Compare | ( | const char * | pzString | ) | const |
int String::Compare | ( | const std::string & | cOther | ) | const |
int String::Compare | ( | const String & | cOther | ) | const |
int String::CompareNoCase | ( | const char * | pzString | ) | const |
int String::CompareNoCase | ( | const std::string & | cOther | ) | const |
int String::CompareNoCase | ( | const String & | cOther | ) | const |
const std::string & String::const_str | ( | ) | const |
Referenced by os::OptionParser::ParseOptions().
size_t String::CountChars | ( | ) | const |
References os::utf8_char_length().
Referenced by os::RegistrarManager::GetTypeAndIcon(), and os::OptionParser::PrintHelpText().
bool String::empty | ( | ) | const |
String::iterator String::end | ( | ) |
String::const_iterator String::end | ( | ) | const |
String::iterator String::erase | ( | iterator | i | ) |
String::iterator String::erase | ( | iterator | cFirst, |
iterator | cLast | ||
) |
size_t String::find | ( | const String & | cStr, |
size_t | nPos = 0 |
||
) | const |
Referenced by AttributeSort::operator()().
String & String::Format | ( | const char * | pzFormat, |
va_list | pArgs | ||
) |
size_t String::Length | ( | ) | const |
String & String::Lower | ( | ) |
Referenced by os::RegistrarManager::RegisterTypeExtension().
String::operator const std::string & | ( | ) | const |
bool String::operator!= | ( | const char * | pzString | ) | const |
bool String::operator!= | ( | const std::string & | cString | ) | const |
bool String::operator!= | ( | const String & | cString | ) | const |
String String::operator+ | ( | const char * | pzString | ) | const |
String String::operator+ | ( | const char | nChar | ) | const |
String String::operator+ | ( | const std::string & | cString | ) | const |
String & String::operator+= | ( | const char * | pzString | ) |
String & String::operator+= | ( | const char | nChar | ) |
String & String::operator+= | ( | const std::string & | cString | ) |
bool String::operator< | ( | const char * | pzString | ) | const |
bool String::operator< | ( | const std::string & | cString | ) | const |
bool String::operator< | ( | const String & | cString | ) | const |
String & String::operator= | ( | const char * | pzString | ) |
Referenced by os::LString::LString().
String & String::operator= | ( | const std::string & | cString | ) |
bool String::operator== | ( | const char * | pzString | ) | const |
bool String::operator== | ( | const std::string & | cString | ) | const |
bool String::operator== | ( | const String & | cString | ) | const |
bool String::operator> | ( | const char * | pzString | ) | const |
bool String::operator> | ( | const std::string & | cString | ) | const |
bool String::operator> | ( | const String & | cString | ) | const |
char String::operator[] | ( | size_t | nPos | ) | const |
char & String::operator[] | ( | size_t | nPos | ) |
void String::reserve | ( | size_t | nLen | ) |
String& os::String::Resize | ( | int | nNewLen | ) |
void String::resize | ( | size_t | nLen | ) |
Referenced by os::OptionParser::GetHelpText(), and os::SymLink::ReadLink().
void String::resize | ( | size_t | nLen, |
char | nFiller | ||
) |
size_t String::size | ( | ) | const |
Referenced by os::Message::AddString(), os::TextEdit::AddUndoNode(), os::AlertView::AlertView(), os::Path::Append(), os::Resources::CreateResource(), os::View::DrawSelectedText(), os::View::DrawString(), os::View::DrawText(), os::RegExp::Expand(), os::FileReference::FileReference(), os::FSNode::FSNode(), os::TextEdit::GetCharPosX(), os::OptionParser::GetHelpText(), os::TextEdit::GetPixelPosX(), os::Slider::GetPreferredSize(), os::Slider::GetProgressString(), os::Slider::GetSliderFrame(), os::Font::GetStringLength(), os::Font::GetStringWidth(), os::Font::GetTextExtent(), os::TextEdit::InsertString(), os::RegExp::Match(), AttributeSort::operator()(), os::FrameView::Paint(), os::OptionParser::ParseOptions(), os::Slider::RenderLabels(), os::TextEdit::SetMaxUndoSize(), os::Variant::SetString(), os::Settings::SetString(), os::Path::SetTo(), os::FSNode::SetTo(), and os::Variant::Variant().
std::string & String::str | ( | ) |
Referenced by os::RegistrarManager::GetTypeAndIcon(), os_priv::DirKeeper::Idle(), and InfoWin::InfoWin().
String & String::Upper | ( | ) |