string class for TCHAR strings More...
#include <utility.h>


Public Types | |
| typedef string | super |
Public Member Functions | |
| String () | |
| String (LPCTSTR s) | |
| String (LPCTSTR s, int l) | |
| String (const super &other) | |
| String (const String &other) | |
| String (LPCWSTR s) | |
| String (LPCWSTR s, int l) | |
| String (const wstring &other) | |
| String & | operator= (LPCWSTR s) |
| void | assign (LPCWSTR s) |
| void | assign (LPCWSTR s, int l) |
| void | assign (const BStr &s) |
| String (const BStr &s) | |
| String & | operator= (const BStr &s) |
| String & | operator= (LPCTSTR s) |
| String & | operator= (const super &s) |
| void | assign (LPCTSTR s) |
| void | assign (LPCTSTR s, int l) |
| operator LPCTSTR () const | |
| operator wstring () const | |
| LPTSTR | str () |
| String & | printf (LPCTSTR fmt,...) |
| return modifyable character string pointer | |
| String & | vprintf (LPCTSTR fmt, va_list l) |
| String & | appendf (LPCTSTR fmt,...) |
| String & | vappendf (LPCTSTR fmt, va_list l) |
| void | toLower () |
string class for TCHAR strings
Definition at line 784 of file utility.h.
| typedef string String::super |
| String::String | ( | LPCTSTR | s ) | [inline] |
Definition at line 799 of file utility.h.
{if (s) super::assign(s);}
| String::String | ( | LPCTSTR | s, |
| int | l | ||
| ) | [inline] |
| String::String | ( | const super & | other ) | [inline] |
| String::String | ( | const String & | other ) | [inline] |
| String::String | ( | LPCWSTR | s, |
| int | l | ||
| ) | [inline] |
| String::String | ( | const wstring & | other ) | [inline] |
Definition at line 861 of file utility.h.
References _vsntprintf, BUFFER_LEN, and COUNTOF.
Referenced by Context::toString().
{
va_list l;
TCHAR b[BUFFER_LEN];
va_start(l, fmt);
super::append(b, _vsntprintf(b, COUNTOF(b), fmt, l));
va_end(l);
return *this;
}

| void String::assign | ( | const BStr & | s ) | [inline] |
Definition at line 820 of file utility.h.
References BUFFER_LEN, and BStr::length().
{int l = s.length(); if (l) {char b[BUFFER_LEN]; super::assign(b, WideCharToMultiByte(CP_ACP, 0, s, l, b, BUFFER_LEN, 0, 0));} else erase();}

| void String::assign | ( | LPCTSTR | s ) | [inline] |
Definition at line 827 of file utility.h.
{super::assign(s);}
| void String::assign | ( | LPCTSTR | s, |
| int | l | ||
| ) | [inline] |
Definition at line 828 of file utility.h.
{super::assign(s, l);}
| void String::assign | ( | LPCWSTR | s ) | [inline] |
Definition at line 818 of file utility.h.
References BUFFER_LEN.
Referenced by HyperlinkCtrl::init(), NotifyInfo::modify(), NotifyHook::ModulePathCopyData(), and ResString::ResString().
{if (s) {char b[BUFFER_LEN]; super::assign(b, WideCharToMultiByte(CP_ACP, 0, s, -1, b, BUFFER_LEN, 0, 0)-1);} else erase();}

| void String::assign | ( | LPCWSTR | s, |
| int | l | ||
| ) | [inline] |
Definition at line 819 of file utility.h.
References BUFFER_LEN.
{if (s) {char b[BUFFER_LEN]; super::assign(b, WideCharToMultiByte(CP_ACP, 0, s, l, b, BUFFER_LEN, 0, 0));} else erase();}
| String::operator LPCTSTR | ( | ) | const [inline] |
| String::operator wstring | ( | ) | const [inline] |
Definition at line 835 of file utility.h.
References BUFFER_LEN.
{WCHAR b[BUFFER_LEN]; return wstring(b, MultiByteToWideChar(CP_ACP, 0, c_str(), -1, b, BUFFER_LEN)-1);}
Definition at line 826 of file utility.h.
{super::assign(s); return *this;}
Definition at line 825 of file utility.h.
{if (s) super::assign(s); else erase(); return *this;}
return modifyable character string pointer
Definition at line 840 of file utility.h.
References _vsntprintf, BUFFER_LEN, and COUNTOF.
Referenced by MDIShellBrowserChild::entry_selected(), SDIMainFrame::entry_selected(), get_windows_version_str(), ExplorerGlobals::read_persistent(), TrayNotifyDlg::RefreshProperties(), and SplitFileSysURL().
{
va_list l;
TCHAR b[BUFFER_LEN];
va_start(l, fmt);
super::assign(b, _vsntprintf(b, COUNTOF(b), fmt, l));
va_end(l);
return *this;
}

| LPTSTR String::str | ( | ) | [inline] |
Definition at line 838 of file utility.h.
Referenced by MainFrameBase::FillBookmarks(), TrayNotifyDlg::InsertItem(), NotifyArea::Notify(), and TrayNotifyDlg::Refresh().
{return (LPTSTR)data();} /// return modifyable character string pointer

| void String::toLower | ( | ) | [inline] |
Definition at line 882 of file utility.h.
Referenced by FindProgramDlg::add_entry(), FavoritesMenu::AddEntries(), StartMenu::AddShellEntries(), and FileTypeManager::operator[]().
{
if (!empty())
CharLower(str());
}

Definition at line 873 of file utility.h.
References _vsntprintf, BUFFER_LEN, and COUNTOF.
{
TCHAR b[BUFFER_LEN];
super::append(b, _vsntprintf(b, COUNTOF(b), fmt, l));
return *this;
}
Definition at line 852 of file utility.h.
References _vsntprintf, BUFFER_LEN, and COUNTOF.
{
TCHAR b[BUFFER_LEN];
super::assign(b, _vsntprintf(b, COUNTOF(b), fmt, l));
return *this;
}
|
ROS Explorer Source Code Documentation
generated on 02.01.2013 by
|