Alternate e697dbe9c5997e35395fe158628dd8c5209481da
for Visual Studio 2022 and Windows 11.
|
文字列に関するWindowsAPIを集約したクラス [詳解]
#include <TString.h>
公開メンバ関数 | |
APIENTRY | TString () |
コンストラクタ | |
APIENTRY | TString (const TString &string) |
コンストラクタ | |
APIENTRY | TString (INT length) |
コンストラクタ | |
APIENTRY | TString (LPCTSTR lpctszString) |
コンストラクタ | |
APIENTRY | ~TString () |
デストラクタ | |
INT APIENTRY | Byte () const |
内部で確保している文字列(バイト数)を取得します。 | |
LPCTSTR APIENTRY | Ctr () const |
内部で確保している文字列ポインタを取得します。 | |
int APIENTRY | Find (TString keyword, int position=0) |
文字列を検索します。 | |
TString &APIENTRY | Format (LPCTSTR format,...) |
フォーマットに従ってパラメータを文字列化します。 | |
BOOL APIENTRY | FromMultiByte (LPCSTR lpcszSJIS, UINT codePage=CP_ACP) |
マルチバイト文字列を取り込みます。 | |
INT APIENTRY | Len () const |
内部で確保している文字列数を取得します。 | |
BOOL APIENTRY | operator!= (const TString &string) const |
TStringと文字列を比較します。 | |
BOOL APIENTRY | operator!= (LPCTSTR lpctszString) const |
文字列と比較します。 | |
TString APIENTRY | operator+ (LPCTSTR lpctszString) |
文字列を追加します。 | |
TString APIENTRY | operator+ (TString &string) |
文字列を追加します。 | |
TString &APIENTRY | operator+= (const TString &string) |
文字列を追加します。 | |
TString &APIENTRY | operator+= (LPCTSTR lpctszString) |
文字列を追加します。 | |
bool APIENTRY | operator< (const TString &string) const |
文字列の大小を比較します。 | |
TString &APIENTRY | operator<< (const int iValue) |
数値を代入します。 | |
TString &APIENTRY | operator<< (const TString &string) |
文字列を代入します。 | |
TString &APIENTRY | operator<< (LPCTSTR lpctszString) |
文字列を代入します。 | |
VOID APIENTRY | operator= (const TString &string) |
文字列を代入します。 | |
VOID APIENTRY | operator= (LPCTSTR lpctszString) |
文字列を代入します。 | |
BOOL APIENTRY | operator== (const TString &string) const |
TStringと文字列を比較します。 | |
BOOL APIENTRY | operator== (LPCTSTR lpctszString) const |
文字列と比較します。 | |
TCHAR APIENTRY | operator[] (int index) const |
文字列の一部を取り出します。 | |
int APIENTRY | ParseInt () const |
文字列の数値化 | |
LPTSTR APIENTRY | Ptr () const |
内部で確保している文字列ポインタを取得します。 | |
TString APIENTRY | Replace (TString &charsBefore, TString &charsAfter) |
文字列を置換します。 | |
TString APIENTRY | ReplaceAll (TString &charsBefore, TString &charsAfter) |
文字列を置換します。 | |
skeleton::Array< TString > APIENTRY | Split (const TString &delimiters) |
文字列を指定した文字列で分割します。 | |
TString APIENTRY | Substring (int startPos, int length=0) |
文字列を切り出します。 | |
int APIENTRY | ToSJIS (LPSTR lpszSJIS, DWORD dwLen) |
SJIS文字列を出力します。 | |
TString &APIENTRY | Trim () |
左右の余白を切り取ります。 | |
TString &APIENTRY | TrimLeft () |
左側の余白を切り取ります。 | |
TString &APIENTRY | TrimRight () |
右側の余白を切り取ります。 | |
![]() | |
APIENTRY | WindowsLibrary () |
コンストラクタ | |
virtual APIENTRY | ~WindowsLibrary () |
デストラクタ | |
virtual DWORD APIENTRY | GetErrNo () const |
WindowsAPIのエラー値を取得します。 | |
virtual VOID APIENTRY | SetErrNo () |
WINAPIエラーの情報を設定します。 | |
限定公開メンバ関数 | |
VOID APIENTRY | Add (LPCTSTR lpctszString) |
VOID APIENTRY | Clear () |
int APIENTRY | Compare (LPCTSTR lpctszString1, LPCTSTR lpctszString2, int size) const |
VOID APIENTRY | Copy (LPCTSTR lpctszString) |
LPTSTR APIENTRY | CreateMemory (ULONGLONG size) |
INT APIENTRY | Length (LPCTSTR lpctszString) const |
限定公開変数類 | |
LPTSTR | _lptszString |
![]() | |
DWORD | _dwErrorNo |
TString::TString | ( | ) |
TString::TString | ( | LPCTSTR | lpctszString | ) |
TString::TString | ( | const TString & | string | ) |
TString::TString | ( | INT | length | ) |
コンストラクタ
[in] | length | 生成時に確保するメモリサイズ(文字数) |
TString.cpp の 29 行目に定義があります。
参照先 _lptszString, CreateMemory().
TString::~TString | ( | ) |
|
protected |
TString.cpp の 435 行目に定義があります。
参照先 _lptszString, Clear(), CreateMemory(), Len(), Length().
参照元 operator+=(), operator<<().
INT TString::Byte | ( | ) | const |
|
protected |
|
protected |
|
protected |
TString.cpp の 418 行目に定義があります。
参照先 _lptszString, Clear(), CreateMemory(), Length().
参照元 TString(), operator=().
|
protected |
|
inline |
内部で確保している文字列ポインタを取得します。
参照元 alt::FactoryMethod::ClockElement::ClockElement(), alt::FactoryMethod::DummyProduct::DummyProduct(), alt::FactoryMethod::TerminateElement::TerminateElement(), _tmain(), alt::PerformanceDataItem::AddCounter(), alt::Log::AppendLog(), alt::Utility::Base64Decode(), PerfCheck::TStringPerformanceCheck::Core2(), alt::FactoryMethod::Creator::CreateElement(), alt::Log::CreateLog(), alt::FactoryMethod::Creator::CreateProduct(), DrivePipelineFactory(), DriveTcpClient(), DriveTcpProxy(), DriveTcpServer(), DriveUdpController1(), DriveUdpController2(), alt::FactoryMethod::DummyProduct::Exit(), alt::FileUtility::Find(), alt::FileUtility::Find2(), alt::Log::FindHistory(), alt::MiddleLibrary::GetProfileStr(), alt::MiddleLibrary::GetProfileValue(), alt::FactoryMethod::DummyProduct::Init(), alt::FactoryMethod::ClockElement::Invoke(), alt::FactoryMethod::Config::Load(), alt::Log::OpenLog(), operator<(), operator==(), alt::FactoryMethod::DummyProduct::Process(), alt::FactoryMethod::Config::Reload(), ReplaceAll(), alt::Log::RotateLogFile(), alt::FactoryMethod::DummyProduct::Start(), alt::FactoryMethod::DummyProduct::Stop(), WindowsLibraryTest::TEST_CLASS(), MiddleLibraryTest::TEST_CLASS(), alt::FactoryMethod::TerminateElement::Update(), alt::FactoryMethod::DummyProduct::Update(), alt::FactoryMethod::ProductManager::Update(), alt::Utility::WriteIniFile() (計41項目).
int TString::Find | ( | TString | keyword, |
int | position = 0 |
||
) |
文字列を検索します。
[in] | keyword | 検索する文字列 |
[in] | position | 検索開始位置 |
TString.cpp の 296 行目に定義があります。
参照先 _lptszString, Len(), Ptr().
参照元 Replace(), ReplaceAll().
TString & TString::Format | ( | LPCTSTR | format, |
... | |||
) |
フォーマットに従ってパラメータを文字列化します。
[in] | format | 文字列フォーマット |
TString.cpp の 333 行目に定義があります。
参照先 _lptszString, Clear(), CreateMemory().
参照元 PerfCheck::TStringPerformanceCheck::Core2(), LeakCheck::TStringMemoryLeakCheck::DoAction4(), alt::FileUtility::Find(), alt::FileUtility::Find2(), alt::Utility::GetFormatTime(), alt::FactoryMethod::ClockElement::Invoke(), alt::Utility::MakeGUID(), WindowsLibraryTest::TEST_CLASS(), alt::FactoryMethod::TerminateElement::Update(), alt::FactoryMethod::DummyProduct::Update(), alt::FactoryMethod::ProductManager::Update().
BOOL TString::FromMultiByte | ( | LPCSTR | lpcszSJIS, |
UINT | codePage = CP_ACP |
||
) |
マルチバイト文字列を取り込みます。
[in] | lpcszSJIS | ヌルターミネートされた文字列 |
[in] | codePage | マルチバイトの文字コード |
true | 成功 |
false | 失敗 |
TString.cpp の 350 行目に定義があります。
参照先 Ptr().
INT TString::Len | ( | ) | const |
内部で確保している文字列数を取得します。
TString.cpp の 39 行目に定義があります。
参照先 _lptszString, Length().
参照元 Add(), alt::Utility::Base64Decode(), Byte(), Find(), operator<(), operator==(), operator[](), ParseInt(), Replace(), ReplaceAll(), Split(), Substring(), WindowsLibraryTest::TEST_CLASS(), TrimLeft(), TrimRight() (計15項目).
|
protected |
TString.cpp の 469 行目に定義があります。
参照元 Add(), Copy(), Len(), operator<(), operator==().
BOOL TString::operator!= | ( | const TString & | string | ) | const |
TStringと文字列を比較します。
[in] | string | 比較するTStringオブジェクト |
TRUE | 一致する |
FALSE | 一致しない |
TString.cpp の 73 行目に定義があります。
参照先 operator==().
BOOL TString::operator!= | ( | LPCTSTR | lpctszString | ) | const |
TString TString::operator+ | ( | LPCTSTR | lpctszString | ) |
TString & TString::operator+= | ( | LPCTSTR | lpctszString | ) |
bool TString::operator< | ( | const TString & | string | ) | const |
文字列の大小を比較します。
[in] | string | 比較対象 |
true | 比較する側が小さい |
false | 比較する側が大きい |
TString.cpp の 142 行目に定義があります。
TString & TString::operator<< | ( | const int | iValue | ) |
TString & TString::operator<< | ( | LPCTSTR | lpctszString | ) |
VOID TString::operator= | ( | const TString & | string | ) |
VOID TString::operator= | ( | LPCTSTR | lpctszString | ) |
BOOL TString::operator== | ( | const TString & | string | ) | const |
TStringと文字列を比較します。
[in] | string | 比較するTStringオブジェクト |
TRUE | 一致する |
FALSE | 一致しない |
TString.cpp の 60 行目に定義があります。
BOOL TString::operator== | ( | LPCTSTR | lpctszString | ) | const |
文字列と比較します。
TRUE | 一致する |
FALSE | 一致しない |
TString.cpp の 49 行目に定義があります。
参照先 _lptszString, Compare(), Length(), size.
参照元 operator!=().
TCHAR TString::operator[] | ( | int | index | ) | const |
文字列の一部を取り出します。
[in] | index | 場所の指定 |
TString.cpp の 149 行目に定義があります。
参照先 _lptszString, Len().
int TString::ParseInt | ( | ) | const |
|
inline |
内部で確保している文字列ポインタを取得します。
参照元 TString(), _tmain(), PerfCheck::TStringPerformanceCheck::Core1(), alt::FileUtility::DirectoryWatch(), DriveTcpClient(), DriveTcpProxy(), DriveTcpServer(), DriveUdpController1(), DriveUdpController2(), Find(), FromMultiByte(), alt::FileUtility::GetAbsolutePath(), alt::FileUtility::GetCurrentDir(), alt::Utility::GetEnv(), alt::MiddleLibrary::GetFormattedDateTime(), alt::FileUtility::GetTemporaryFileName(), alt::FileUtility::GetTemporaryPath(), operator+=(), operator<<(), operator=(), alt::Log::RotateLogFile(), Split(), Substring(), WindowsLibraryTest::TEST_CLASS(), MiddleLibraryTest::TEST_CLASS() (計25項目).
文字列を置換します。
[in] | charsBefore | 検索する文字列 |
[in] | charsAfter | 置換する文字列 |
TString.cpp の 233 行目に定義があります。
参照先 Find(), Len(), Substring().
参照元 LeakCheck::TStringMemoryLeakCheck::DoAction4(), WindowsLibraryTest::TEST_CLASS().
文字列を置換します。
[in] | charsBefore | 検索する文字列 |
[in] | charsAfter | 置換する文字列 |
TString.cpp の 246 行目に定義があります。
参照先 Ctr(), Find(), Len(), Substring().
参照元 LeakCheck::TStringMemoryLeakCheck::DoAction4(), WindowsLibraryTest::TEST_CLASS().
skeleton::Array< TString > TString::Split | ( | const TString & | delimiters | ) |
文字列を指定した文字列で分割します。
[in] | delimiters | 分割する文字の集合 |
TString.cpp の 267 行目に定義があります。
参照先 _lptszString, alt::skeleton::Array< T >::Add(), Len(), Ptr().
TString TString::Substring | ( | int | startPos, |
int | length = 0 |
||
) |
文字列を切り出します。
[in] | startPos | 切り出し開始位置 |
[in] | length | 切り出しサイズ |
TString.cpp の 219 行目に定義があります。
参照先 _lptszString, Len(), Ptr().
参照元 alt::FactoryMethod::Creator::CreateProduct(), Replace(), ReplaceAll(), WindowsLibraryTest::TEST_CLASS().
int TString::ToSJIS | ( | LPSTR | lpszSJIS, |
DWORD | dwLen | ||
) |
SJIS文字列を出力します。
[out] | lpszSJIS | SJIS文字列 |
[in] | dwLen | SJIS文字列を格納するバッファサイズ |
TString.cpp の 364 行目に定義があります。
参照先 _lptszString.
TString & TString::Trim | ( | ) |
TString & TString::TrimLeft | ( | ) |
TString & TString::TrimRight | ( | ) |
|
protected |
参照元 TString(), Add(), Clear(), Copy(), Find(), Format(), Len(), operator+(), operator<(), operator==(), operator[](), ParseInt(), Split(), Substring(), ToSJIS(), TrimLeft(), TrimRight() (計17項目).