|
DotNetDupe 4.0.6
C++17/20 Implementation of the .NET Base Class Library (BCL)
|
Represents text as a sequence of UTF-8 code units with culture-invariant operations. More...
#include <String.h>
Public Member Functions | |
| String () | |
| Initializes a new instance of the String class to an empty string. | |
| String (const char *pStr) | |
| Initializes a new instance of the String class from a null-terminated UTF-8 string. | |
| String (const String &sStr) | |
| Copy constructor. | |
| String (const wchar_t *pStr) | |
| String (int nNull) | |
| String (std::nullptr_t) | |
| String (String &&sStr) noexcept | |
| Move constructor. | |
| ~String () | |
| String & | Append (const char ch) |
| String & | Append (const String &sStr) |
| String | Clone () const |
| int | CompareTo (const String &sStr) const |
| String | Concat (const std::initializer_list< String > sStrs) const |
| bool | Contains (char ch) const |
| bool | Contains (const String &sStr) const |
| void | CopyTo (int iSourceIndex, char *pDestination, int iDestinationIndex, int iDestArraySize, int iCount) const |
| bool | EndsWith (char ch, bool bIgnoreCase) const |
| bool | EndsWith (const String &sSuffix, bool bIgnoreCase) const |
| bool | Equals (const String &sStr) const |
| const char * | GetChars () const |
| int | GetHashCode () const |
| int | GetLength () const |
| const char * | GetRawString () const |
| int | IndexOf (const String &sSubstring) const |
| int | IndexOf (const String &sSubstring, bool bIgnoreCase) const |
| int | IndexOf (const String &sSubstring, int iStartIndex, bool bIgnoreCase) const |
| int | IndexOfAny (int iStartIndex, std::initializer_list< char > chChars) |
| String & | Insert (int iIndex, const String &sStr) |
| bool | IsEmpty () const |
| int | LastIndexOf (const String &sStr, bool bIgnoreCase) |
| int | LastIndexOfAny (int iStartIndex, std::initializer_list< char > chChars, bool bIgnoreCase) |
| operator const char * () const | |
| void | operator delete (void *p) |
| void | operator delete[] (void *p) |
| void * | operator new (size_t size) |
| void * | operator new[] (size_t size) |
| String | operator+ (char ch) const |
| String | operator+ (const char *pStr) const |
| String | operator+ (const String &sStr) const |
| String & | operator+= (char ch) |
| String & | operator+= (const char *pStr) |
| String & | operator+= (const String &sStr) |
| bool | operator< (const String &sStr) const |
| String & | operator= (const char *pStr) |
| Assigns a null-terminated UTF-8 string to this instance. | |
| String & | operator= (const String &sStr) |
| Copy assignment operator. | |
| String & | operator= (const wchar_t *pStr) |
| String & | operator= (std::nullptr_t) |
| String & | operator= (String &&sStr) noexcept |
| Move assignment operator. | |
| char | operator[] (int iIndex) const |
| String | PadLeft (int iTotalWidth) |
| String | PadLeft (int iTotalWidth, char ch) |
| String | PadRight (int iTotalWidth) |
| String | PadRight (int iTotalWidth, char ch) |
| String | Remove (int iStartIndex) const |
| String | Remove (int iStartIndex, int iCount) const |
| String | Replace (char chOriginalChar, char chReplaceChar) const |
| String | Replace (const String &sOriginalStr, const String &sReplaceStr) const |
| Array< String > | Split (char chSeparator) const |
| Array< String > | Split (const Array< String > &arrSeparators, StringSplitOptions eOptions=StringSplitOptions::None) const |
| Array< String > | Split (const String *pSeparator, int iCount, StringSplitOptions eOptions) const |
| bool | StartsWith (const String &sPrefix) const |
| bool | StartsWith (const String &sPrefix, bool bIgnoreCase) const |
| String | Substring (int iStartIndex) const |
| String | Substring (int iStartIndex, int iLength) const |
| String | ToLower () const |
| String | ToUpper () const |
| String | Trim () const |
| String | TrimEnd () const |
| String | TrimStart () const |
Static Public Member Functions | |
| static int | Compare (const String &sStr1, int iIndex1, const String &sStr2, int iIndex2, int iLength, bool bIgnoreCase) |
| static bool | Equals (const String &sStr1, const String &sStr2) |
| static String | Format (const char *pFormat) |
| template<typename Arg1, typename... Args> | |
| static String | Format (const char *pFormat, const Arg1 &arg1, const Args &... args) |
| static String | Format (const String &sFormat) |
| template<typename Arg1, typename... Args> | |
| static String | Format (const String &sFormat, const Arg1 &arg1, const Args &... args) |
| static String | FormatArgHelper (bool b) |
| static String | FormatArgHelper (char c) |
| static String | FormatArgHelper (const char *s) |
| static String | FormatArgHelper (const String &s) |
| template<typename T> | |
| static String | FormatArgHelper (const T &arg) |
| static String | FormatArgHelper (double d) |
| static String | FormatArgHelper (float f) |
| static String | FormatArgHelper (int i) |
| static String | FormatArgHelper (long l) |
| static String | FormatArgHelper (long long ll) |
| static String | FormatArgHelper (short i) |
| static String | FormatArgHelper (std::nullptr_t) |
| static String | FormatArgHelper (unsigned int u) |
| static String | FormatArgHelper (unsigned long long ull) |
| static String | FormatArgHelper (unsigned long ul) |
| static String | FormatArgHelper (unsigned short i) |
| static String | FromInt (int iValue) |
| static String | InternalFormat (const char *pFormat, const String *pArgs, int iArgCount) |
| static String | Join (char chSeparator, std::initializer_list< String > sStrings) |
| static String | Join (char chSeparator, std::initializer_list< String > sStrings, int iStartIndex, int iCount) |
| static String | Join (const String &sSeparator, std::initializer_list< String > sStrings) |
| static String | Join (const String &sSeparator, std::initializer_list< String > sStrings, int iStartIndex, int iCount) |
| static String | ToString (bool bValue) |
| static String | ToString (double dValue) |
| static String | ToString (int iValue) |
| static String | ToString (long long llValue) |
| static String | ValueOf (double dValue) |
| static String | ValueOf (int iValue) |
| static String | ValueOf (long long llValue) |
Represents text as a sequence of UTF-8 code units with culture-invariant operations.
The String class mirrors .NET System.String, providing rich manipulation, formatting, splitting, trimming, searching, case transformations, and conversions. Immutable by design and thread-safe for all concurrent const read operations.
| DotNetDupe::System::String::String | ( | ) |
Initializes a new instance of the String class to an empty string.
Definition at line 64 of file String.cpp.
Referenced by String(), String(), DotNetDupe::System::Net::Sockets::TcpListener::AcceptSocket(), DotNetDupe::System::Net::Sockets::TcpListener::AcceptTcpClient(), Append(), Append(), DotNetDupe::System::IdentityModel::Tokens::Jwt::Base64ToBase64Url(), DotNetDupe::System::IdentityModel::Tokens::Jwt::Base64UrlToBase64(), DotNetDupe::System::Net::Sockets::Socket::Bind(), DotNetDupe::System::Console::Clear(), Clone(), DotNetDupe::System::Net::CollectIpv4Addresses(), Compare(), CompareTo(), DotNetDupe::System::Net::WebSockets::WebSocket::ComputeSecWebSocketAccept(), Concat(), Contains(), DotNetDupe::System::Data::Internal::ConvertResultRows(), DotNetDupe::System::Diagnostics::EventLog::CreateEventSource(), DotNetDupe::System::IdentityModel::Tokens::Jwt::DecodeBase64UrlToDict(), EndsWith(), DotNetDupe::System::Diagnostics::SystemMetrics::EnrichProcessInfo(), Equals(), Equals(), DotNetDupe::System::Uri::EscapeDataString(), DotNetDupe::System::Text::Json::EscapeString(), DotNetDupe::System::Environment::ExpandEnvironmentVariables(), DotNetDupe::System::Diagnostics::ExtractProviderAndId(), DotNetDupe::System::Diagnostics::FastPopulateProc(), Format(), Format(), Format(), Format(), FormatArgHelper(), FormatArgHelper(), FormatArgHelper(), FormatArgHelper(), FormatArgHelper(), FormatArgHelper(), FormatArgHelper(), FormatArgHelper(), FormatArgHelper(), FormatArgHelper(), FormatArgHelper(), FormatArgHelper(), FormatArgHelper(), FormatArgHelper(), FormatArgHelper(), FormatArgHelper(), DotNetDupe::System::ComponentModel::FormatErrorMessage(), DotNetDupe::System::Text::Json::FormatJsonArray(), DotNetDupe::System::Text::Json::FormatJsonNumber(), DotNetDupe::System::Text::Json::FormatJsonObject(), DotNetDupe::System::Net::Sockets::FormatSockAddrIp(), DotNetDupe::System::Convert::FromBase64String(), FromInt(), DotNetDupe::System::IO::GenerateRandomTempFileName(), DotNetDupe::System::Environment::GetCurrentDirectory(), DotNetDupe::System::IO::Directory::GetCurrentDirectory(), DotNetDupe::System::IO::Directory::GetDirectories(), DotNetDupe::System::Environment::GetEnvironmentVariable(), DotNetDupe::System::Environment::GetEnvironmentVariables(), DotNetDupe::System::IO::Directory::GetFiles(), DotNetDupe::System::IO::Directory::GetFileSystemEntries(), DotNetDupe::System::Environment::GetFolderPath(), DotNetDupe::System::Net::Dns::GetHostAddresses(), DotNetDupe::System::Environment::GetLogicalDrives(), DotNetDupe::System::Environment::GetMachineName(), DotNetDupe::System::Threading::Thread::GetName(), DotNetDupe::System::Environment::GetOSVersion(), DotNetDupe::System::Diagnostics::SystemMetrics::GetProcessCommandLine(), DotNetDupe::System::IO::Path::GetRandomFileName(), DotNetDupe::System::OperatingSystem::GetServicePack(), DotNetDupe::System::Diagnostics::TerminalSession::GetSessions(), DotNetDupe::System::Net::Sockets::TcpClient::GetStream(), DotNetDupe::System::Net::Http::HttpClient::GetString(), DotNetDupe::System::Text::UTF8Encoding::GetString(), DotNetDupe::System::Text::UTF8Encoding::GetString(), DotNetDupe::System::Environment::GetSystemDirectory(), DotNetDupe::System::IO::Path::GetTempPath(), DotNetDupe::System::Console::GetTitle(), DotNetDupe::System::Environment::GetUserName(), DotNetDupe::System::Net::Security::HandleHandshakeError(), DotNetDupe::System::Net::Security::HandleReadError(), DotNetDupe::System::Net::Security::HandleWriteError(), IndexOf(), IndexOf(), IndexOf(), Insert(), InternalFormat(), Join(), Join(), Join(), Join(), LastIndexOf(), operator!=, operator!=, operator!=, operator+(), operator+, operator+(), operator+, operator+(), operator+=(), operator+=(), operator+=(), operator<(), operator=(), operator=(), operator=(), operator=(), operator=(), operator==, operator==, operator==, PadLeft(), PadLeft(), PadRight(), PadRight(), DotNetDupe::System::ParseAuthorityComponents(), DotNetDupe::System::ParsePath(), DotNetDupe::System::ParseQueryAndFragment(), DotNetDupe::System::ParseSchemeAndAuthority(), DotNetDupe::System::Diagnostics::PopulateSessionInfo(), DotNetDupe::System::Security::Principal::PopulateWin32UserGroups(), DotNetDupe::System::Net::Http::ByteArrayContent::ReadAsString(), DotNetDupe::System::Net::Http::StreamContent::ReadAsString(), DotNetDupe::System::ReadCommandLineTokens(), DotNetDupe::System::Console::ReadLine(), DotNetDupe::System::IO::StringReader::ReadLine(), DotNetDupe::System::IO::TextReader::ReadLine(), DotNetDupe::System::IO::BinaryReader::ReadString(), DotNetDupe::System::IO::StringReader::ReadToEnd(), DotNetDupe::System::Net::Sockets::UdpClient::Receive(), DotNetDupe::System::Net::WebSockets::WebSocket::ReceiveText(), Remove(), Remove(), Replace(), Replace(), DotNetDupe::System::Net::Http::FileDownloader::Resume(), DotNetDupe::System::Net::Sockets::UdpClient::Send(), DotNetDupe::System::Net::Sockets::UdpClient::Send(), Split(), Split(), DotNetDupe::System::Net::Http::FileDownloader::Start(), StartsWith(), StartsWith(), Substring(), Substring(), DotNetDupe::System::Convert::ToBase64String(), DotNetDupe::System::ToBaseString(), DotNetDupe::System::Convert::ToBoolean(), DotNetDupe::System::Convert::ToByte(), DotNetDupe::System::Convert::ToByte(), DotNetDupe::System::Convert::ToChar(), DotNetDupe::System::Convert::ToDouble(), DotNetDupe::System::Convert::ToInt16(), DotNetDupe::System::Convert::ToInt16(), DotNetDupe::System::Convert::ToInt32(), DotNetDupe::System::Convert::ToInt32(), DotNetDupe::System::Convert::ToInt64(), DotNetDupe::System::Convert::ToInt64(), ToLower(), DotNetDupe::System::Convert::ToSByte(), DotNetDupe::System::Convert::ToSingle(), DotNetDupe::System::BitConverter::ToString(), DotNetDupe::System::Convert::ToString(), DotNetDupe::System::Convert::ToString(), DotNetDupe::System::Convert::ToString(), DotNetDupe::System::Convert::ToString(), DotNetDupe::System::Convert::ToString(), DotNetDupe::System::Convert::ToString(), DotNetDupe::System::Convert::ToString(), DotNetDupe::System::Convert::ToString(), DotNetDupe::System::Convert::ToString(), DotNetDupe::System::Convert::ToString(), DotNetDupe::System::Convert::ToString(), DotNetDupe::System::DateTime::ToString(), DotNetDupe::System::DateTimeOffset::ToString(), DotNetDupe::System::Guid::ToString(), ToString(), ToString(), ToString(), ToString(), DotNetDupe::System::Text::StringBuilder::ToString(), DotNetDupe::System::UriBuilder::ToString(), DotNetDupe::System::Version::ToString(), DotNetDupe::System::Convert::ToUInt16(), DotNetDupe::System::Convert::ToUInt32(), DotNetDupe::System::Convert::ToUInt64(), ToUpper(), Trim(), TrimEnd(), TrimStart(), DotNetDupe::System::IO::Path::TryJoin(), DotNetDupe::System::Uri::UnescapeDataString(), ValueOf(), ValueOf(), ValueOf(), DotNetDupe::System::Console::Write(), DotNetDupe::System::Console::Write(), DotNetDupe::System::Console::Write(), DotNetDupe::System::Console::Write(), DotNetDupe::System::Console::Write(), DotNetDupe::System::IO::TextWriter::Write(), DotNetDupe::System::Console::WriteLine(), DotNetDupe::System::Console::WriteLine(), DotNetDupe::System::Console::WriteLine(), DotNetDupe::System::Console::WriteLine(), DotNetDupe::System::Console::WriteLine(), DotNetDupe::System::Console::WriteLine(), and DotNetDupe::System::Console::WriteLine().
| DotNetDupe::System::String::String | ( | const char * | pStr | ) |
Initializes a new instance of the String class from a null-terminated UTF-8 string.
| pStr | Null-terminated C-string pointer. |
Definition at line 188 of file String.cpp.
References DotNetDupe::System::ArgumentException::ArgumentException().
| DotNetDupe::System::String::String | ( | const String & | sStr | ) |
Copy constructor.
| sStr | String instance to copy. |
Definition at line 194 of file String.cpp.
References String().
|
noexcept |
Move constructor.
| sStr | String instance to move. |
Definition at line 203 of file String.cpp.
References String().
| DotNetDupe::System::String::~String | ( | ) |
Definition at line 65 of file String.cpp.
| DotNetDupe::System::String::String | ( | const wchar_t * | pStr | ) |
Definition at line 210 of file String.cpp.
References DotNetDupe::System::ArgumentException::ArgumentException(), and DotNetDupe::System::Utils::StringConvert::WCharToUtf8().
|
inline |
Definition at line 114 of file String.h.
References DotNetDupe::System::ArgumentException::ArgumentException(), and DOTNETDUPE_API.
|
inline |
Definition at line 116 of file String.h.
References DotNetDupe::System::ArgumentException::ArgumentException(), and DOTNETDUPE_API.
| String & DotNetDupe::System::String::Append | ( | const char | ch | ) |
Definition at line 380 of file String.cpp.
References String().
Referenced by DotNetDupe::System::IO::AppendPathSegment(), DotNetDupe::System::IO::Path::Combine(), DotNetDupe::System::IO::Path::GetTempPath(), Join(), and Join().
Definition at line 384 of file String.cpp.
References String(), and GetRawString().
| String DotNetDupe::System::String::Clone | ( | ) | const |
Definition at line 251 of file String.cpp.
References String(), and GetRawString().
|
static |
Definition at line 268 of file String.cpp.
References String(), and DotNetDupe::System::ToLowerString().
Referenced by EndsWith(), and StartsWith().
| int DotNetDupe::System::String::CompareTo | ( | const String & | sStr | ) | const |
Definition at line 277 of file String.cpp.
References String(), and GetRawString().
| bool DotNetDupe::System::String::Contains | ( | char | ch | ) | const |
Definition at line 292 of file String.cpp.
Referenced by DotNetDupe::System::Net::Http::StringContent::StringContent(), and DotNetDupe::System::IO::ValidatePathChars().
| bool DotNetDupe::System::String::Contains | ( | const String & | sStr | ) | const |
Definition at line 295 of file String.cpp.
References String().
| void DotNetDupe::System::String::CopyTo | ( | int | iSourceIndex, |
| char * | pDestination, | ||
| int | iDestinationIndex, | ||
| int | iDestArraySize, | ||
| int | iCount ) const |
Definition at line 299 of file String.cpp.
References DotNetDupe::System::ArgumentException::ArgumentException(), DotNetDupe::System::ArgumentOutOfRangeException::ArgumentOutOfRangeException(), and GetLength().
| bool DotNetDupe::System::String::EndsWith | ( | char | ch, |
| bool | bIgnoreCase ) const |
Definition at line 315 of file String.cpp.
Referenced by DotNetDupe::System::Net::Http::RestClient< TResource >::Delete(), DotNetDupe::System::Environment::ExpandEnvironmentVariables(), DotNetDupe::System::Net::Http::RestClient< TResource >::Get(), DotNetDupe::System::IO::Path::GetTempPath(), DotNetDupe::System::Diagnostics::MatchProcessName(), and DotNetDupe::System::Net::Http::RestClient< TResource >::Put().
| bool DotNetDupe::System::String::EndsWith | ( | const String & | sSuffix, |
| bool | bIgnoreCase ) const |
Definition at line 323 of file String.cpp.
References String(), Compare(), and GetLength().
| bool DotNetDupe::System::String::Equals | ( | const String & | sStr | ) | const |
Definition at line 338 of file String.cpp.
References String().
Definition at line 334 of file String.cpp.
References String().
Referenced by DotNetDupe::System::Uri::IsFile(), DotNetDupe::System::Diagnostics::MatchProcessName(), and DotNetDupe::System::ParsePath().
|
inlinestatic |
Definition at line 243 of file String.h.
References String(), and InternalFormat().
|
inlinestatic |
Definition at line 239 of file String.h.
References String(), FormatArgHelper(), and InternalFormat().
Referenced by Format(), Format(), DotNetDupe::Extensions::Logging::LoggerTextWriter::Write(), DotNetDupe::Extensions::Logging::LoggerTextWriter::Write(), DotNetDupe::Extensions::Logging::LoggerTextWriter::Write(), DotNetDupe::Extensions::Logging::LoggerTextWriter::Write(), DotNetDupe::Extensions::Logging::LoggerTextWriter::Write(), DotNetDupe::Extensions::Logging::LoggerTextWriter::Write(), DotNetDupe::System::Console::Write(), DotNetDupe::System::Console::Write(), DotNetDupe::System::Console::WriteLine(), and DotNetDupe::System::Console::WriteLine().
Definition at line 246 of file String.h.
References String(), Format(), and GetRawString().
|
inlinestatic |
Definition at line 250 of file String.h.
References String(), Format(), and GetRawString().
|
inlinestatic |
|
inlinestatic |
|
inlinestatic |
|
inlinestatic |
Definition at line 234 of file String.h.
References String(), and ToString().
|
inlinestatic |
|
inlinestatic |
|
inlinestatic |
|
inlinestatic |
|
inlinestatic |
|
inlinestatic |
|
inlinestatic |
|
inlinestatic |
|
inlinestatic |
|
inlinestatic |
|
inlinestatic |
|
static |
Definition at line 624 of file String.cpp.
References String(), and ValueOf().
Referenced by FormatArgHelper(), FormatArgHelper(), and FormatArgHelper().
| const char * DotNetDupe::System::String::GetChars | ( | ) | const |
Definition at line 233 of file String.cpp.
References GetRawString().
| int DotNetDupe::System::String::GetHashCode | ( | ) | const |
Definition at line 236 of file String.cpp.
References GetRawString().
Referenced by DotNetDupe::System::HashHelper< String >::GetHashCode().
| int DotNetDupe::System::String::GetLength | ( | ) | const |
Definition at line 247 of file String.cpp.
Referenced by DotNetDupe::System::Guid::Guid(), DotNetDupe::System::IO::AppendPathSegment(), DotNetDupe::System::Diagnostics::BuildCommandLine(), DotNetDupe::System::IO::Path::ChangeExtension(), DotNetDupe::System::IO::Path::Combine(), DotNetDupe::System::IdentityModel::Tokens::Jwt::ComputeJwtSignature(), CopyTo(), DotNetDupe::System::IdentityModel::Tokens::Jwt::EncodeDictToBase64Url(), DotNetDupe::System::IO::Path::EndsInDirectorySeparator(), EndsWith(), DotNetDupe::System::Environment::ExpandEnvironmentVariables(), DotNetDupe::System::Text::UTF8Encoding::GetBytes(), DotNetDupe::System::IO::Path::GetPathRoot(), IndexOf(), IndexOfAny(), Insert(), DotNetDupe::System::IO::Path::IsPathRooted(), LastIndexOf(), LastIndexOfAny(), DotNetDupe::Extensions::Logging::FileLogger::Log(), DotNetDupe::System::Diagnostics::MatchProcessName(), PadLeft(), PadRight(), DotNetDupe::System::ParseAndAddEnvEntry(), Remove(), Remove(), Replace(), DotNetDupe::System::Net::Http::RestClient< TResource >::SetBasicAuthentication(), StartsWith(), Substring(), Substring(), DotNetDupe::System::Convert::ToChar(), DotNetDupe::System::IO::Path::TrimEndingDirectorySeparator(), DotNetDupe::System::IdentityModel::Tokens::Jwt::JWTToken::Verify(), DotNetDupe::System::IO::BinaryWriter::Write(), and DotNetDupe::System::IO::TextWriter::Write().
| const char * DotNetDupe::System::String::GetRawString | ( | ) | const |
Definition at line 230 of file String.cpp.
Referenced by DotNetDupe::System::Guid::Guid(), Append(), DotNetDupe::System::AppendExplicitArg(), DotNetDupe::System::Net::Security::SslStream::AuthenticateAsClient(), DotNetDupe::System::IdentityModel::Tokens::Jwt::Base64ToBase64Url(), DotNetDupe::System::IdentityModel::Tokens::Jwt::Base64UrlToBase64(), DotNetDupe::System::Diagnostics::BuildCommandLine(), DotNetDupe::Extensions::Logging::LoggerBase::BuildLogMessage(), DotNetDupe::WebAppCore::Http::BuildResponseHeaderString(), DotNetDupe::System::IO::Path::ChangeExtension(), Clone(), CompareTo(), DotNetDupe::System::IdentityModel::Tokens::Jwt::ComputeJwtSignature(), DotNetDupe::System::Net::WebSockets::WebSocket::ComputeSecWebSocketAccept(), DotNetDupe::System::ConvertFormat(), DotNetDupe::System::Data::Internal::ConvertParamsMap(), DotNetDupe::System::Diagnostics::EventLog::Delete(), DotNetDupe::System::IdentityModel::Tokens::Jwt::EncodeDictToBase64Url(), DotNetDupe::System::Text::Json::EscapeString(), DotNetDupe::System::Data::Internal::InMemoryDatabaseBackend::Execute(), DotNetDupe::System::Diagnostics::EventLog::Exists(), DotNetDupe::System::Environment::ExpandEnvironmentVariables(), Format(), Format(), DotNetDupe::System::Text::Json::FormatJsonObject(), DotNetDupe::Extensions::Logging::LoggerBase::FormatLogLine(), DotNetDupe::System::FormatOpenBrace(), DotNetDupe::System::Convert::FromBase64String(), DotNetDupe::System::IO::File::GetAttributes(), DotNetDupe::System::Data::Internal::DatabaseEngine::GetBackend(), DotNetDupe::System::Diagnostics::EtwLogReader::GetChannelEventCount(), DotNetDupe::System::Diagnostics::EtwLogReader::GetChannelEventLevelCounts(), GetChars(), DotNetDupe::Extensions::Logging::LogManager::GetConsoleLogger(), DotNetDupe::System::Environment::GetEnvironmentVariable(), DotNetDupe::Extensions::Logging::LogManager::GetFileLogger(), DotNetDupe::Extensions::Logging::LoggerBase::GetFormattedTimestamp(), GetHashCode(), DotNetDupe::System::Net::Dns::GetHostAddresses(), DotNetDupe::Extensions::Logging::LogManager::GetLogger(), DotNetDupe::WebAppCore::Server::WebAppServer::GetMimeType(), DotNetDupe::WebAppCore::Builder::HeaderContainsToken(), DotNetDupe::System::Net::Sockets::InitSockAddrIn(), Insert(), DotNetDupe::System::Security::Cryptography::X509Certificates::LoadPemCert(), DotNetDupe::System::Security::Cryptography::X509Certificates::LoadPemKey(), DotNetDupe::Extensions::Logging::ConsoleLogger::Log(), DotNetDupe::Extensions::Logging::FileLogger::Log(), DotNetDupe::WebAppCore::Builder::MatchAndFindHandler(), DotNetDupe::System::Diagnostics::OpenWin32EventLogHandle(), operator const char *(), operator+=(), operator<(), operator==, operator==, operator[](), DotNetDupe::System::ParseDateTimeStr(), DotNetDupe::Extensions::Logging::PerformFileRollover(), DotNetDupe::System::PopulateSplitCharSet(), DotNetDupe::WebAppCore::Builder::ProcessWsSession(), DotNetDupe::System::Security::Principal::QueryWin32User(), DotNetDupe::System::Data::Internal::DatabaseEngine::RegisterBackend(), DotNetDupe::System::Data::SqlClient::RegisterSelectedBackend(), DotNetDupe::System::Diagnostics::RegisterWin32EventSourceHandle(), DotNetDupe::Extensions::Logging::ReplaceDynamicPropertyTokens(), DotNetDupe::WebAppCore::Server::ResolveStaticPath(), DotNetDupe::WebAppCore::Builder::WebApplication::Run(), DotNetDupe::System::Net::WebSockets::WebSocket::SendAsync(), DotNetDupe::WebAppCore::Builder::SendHttpResponseData(), DotNetDupe::Extensions::Logging::SerializeUnusedPropertiesText(), DotNetDupe::System::IO::File::SetAttributes(), DotNetDupe::System::Data::SqlClient::SqlConnection::SetConnectionString(), DotNetDupe::System::Environment::SetEnvironmentVariable(), DotNetDupe::System::Console::SetTitle(), DotNetDupe::System::SplitVersionParts(), DotNetDupe::System::Threading::AutoResetEvent::TryOpenExisting(), DotNetDupe::System::Threading::EventWaitHandle::TryOpenExisting(), DotNetDupe::System::Threading::ManualResetEvent::TryOpenExisting(), DotNetDupe::System::Threading::Mutex::TryOpenExisting(), DotNetDupe::System::Threading::Semaphore::TryOpenExisting(), DotNetDupe::System::IdentityModel::Tokens::Jwt::JWTToken::Verify(), DotNetDupe::System::IO::BinaryWriter::Write(), and DotNetDupe::WebAppCore::Http::HttpResponse::WriteChunk().
| int DotNetDupe::System::String::IndexOf | ( | const String & | sSubstring | ) | const |
Definition at line 341 of file String.cpp.
References String(), and IndexOf().
Referenced by DotNetDupe::System::IO::Path::GetPathRoot(), IndexOf(), IndexOf(), and DotNetDupe::System::ParseAndAddEnvEntry().
| int DotNetDupe::System::String::IndexOf | ( | const String & | sSubstring, |
| bool | bIgnoreCase ) const |
Definition at line 344 of file String.cpp.
| int DotNetDupe::System::String::IndexOf | ( | const String & | sSubstring, |
| int | iStartIndex, | ||
| bool | bIgnoreCase ) const |
Definition at line 348 of file String.cpp.
References DotNetDupe::System::ArgumentOutOfRangeException::ArgumentOutOfRangeException(), String(), GetLength(), and IsEmpty().
| int DotNetDupe::System::String::IndexOfAny | ( | int | iStartIndex, |
| std::initializer_list< char > | chChars ) |
Definition at line 369 of file String.cpp.
References DotNetDupe::System::ArgumentOutOfRangeException::ArgumentOutOfRangeException(), and GetLength().
Definition at line 389 of file String.cpp.
References DotNetDupe::System::ArgumentOutOfRangeException::ArgumentOutOfRangeException(), String(), GetLength(), and GetRawString().
|
static |
Guard: Validate format string pointer and argument array.
Parse format string and sequentially substitute placeholders.
Return constructed composite string.
Definition at line 106 of file String.cpp.
References DotNetDupe::System::ArgumentException::ArgumentException(), String(), DotNetDupe::System::FormatClosingBrace(), and DotNetDupe::System::FormatOpenBrace().
| bool DotNetDupe::System::String::IsEmpty | ( | ) | const |
Definition at line 398 of file String.cpp.
Referenced by DotNetDupe::System::Threading::EventWaitHandle::EventWaitHandle(), DotNetDupe::System::Net::Http::FileDownloader::FileDownloader(), DotNetDupe::System::AddSplitToken(), DotNetDupe::System::AppendAuthority(), DotNetDupe::System::AppendPathAndQuery(), DotNetDupe::System::IO::AppendPathSegment(), DotNetDupe::System::Net::WebSockets::WebSocket::ComputeSecWebSocketAccept(), DotNetDupe::System::IO::Directory::CreateDirectory(), DotNetDupe::System::Diagnostics::EventLog::CreateEventSource(), DotNetDupe::System::Diagnostics::EventLog::Delete(), DotNetDupe::System::IO::Directory::Delete(), DotNetDupe::System::Diagnostics::EventLog::DeleteEventSource(), DotNetDupe::System::IO::Path::EndsInDirectorySeparator(), DotNetDupe::System::Diagnostics::SystemMetrics::EnrichProcessInfo(), DotNetDupe::System::Diagnostics::EventLog::Exists(), DotNetDupe::System::IO::Directory::Exists(), DotNetDupe::System::Diagnostics::EtwLogReader::GetChannelEventCount(), DotNetDupe::System::Diagnostics::EtwLogReader::GetChannelEventLevelCounts(), DotNetDupe::System::IO::Path::GetDirectoryName(), DotNetDupe::System::IO::Path::GetExtension(), DotNetDupe::System::IO::Path::GetFileName(), DotNetDupe::System::IO::Path::GetFileNameWithoutExtension(), DotNetDupe::Extensions::Logging::LoggerBase::GetFormattedTimestamp(), DotNetDupe::System::IO::Path::GetFullPath(), DotNetDupe::System::Net::Dns::GetHostAddresses(), DotNetDupe::System::IO::Path::GetPathRoot(), DotNetDupe::System::Diagnostics::SystemMetrics::GetProcessCommandLine(), DotNetDupe::System::Diagnostics::Process::GetProcessesByName(), DotNetDupe::System::Security::Principal::UserPrincipal::GetUser(), DotNetDupe::System::IO::Path::HasExtension(), IndexOf(), DotNetDupe::System::Net::Sockets::InitSockAddrIn(), DotNetDupe::System::Data::SqlClient::SqlDataReader::IsDBNull(), DotNetDupe::System::IO::Path::IsPathFullyQualified(), DotNetDupe::System::IO::Path::IsPathRooted(), LastIndexOf(), LastIndexOfAny(), DotNetDupe::System::IO::Directory::Move(), DotNetDupe::System::Version::Parse(), DotNetDupe::System::ParsePath(), DotNetDupe::System::Diagnostics::EtwLogReader::ReadEvents(), Replace(), DotNetDupe::Extensions::Logging::ResolveAndPrepareLogPath(), DotNetDupe::WebAppCore::Builder::RunWsReceiveLoop(), DotNetDupe::WebAppCore::Server::ServeStaticFile(), DotNetDupe::System::IO::Directory::SetCurrentDirectory(), DotNetDupe::System::Diagnostics::EventLog::SourceExists(), DotNetDupe::System::SplitVersionParts(), DotNetDupe::System::Diagnostics::EtwLogReader::StartListening(), DotNetDupe::System::IO::Path::TrimEndingDirectorySeparator(), DotNetDupe::System::Threading::AutoResetEvent::TryOpenExisting(), DotNetDupe::System::Threading::EventWaitHandle::TryOpenExisting(), DotNetDupe::System::Threading::ManualResetEvent::TryOpenExisting(), DotNetDupe::System::Threading::Mutex::TryOpenExisting(), DotNetDupe::System::Threading::Semaphore::TryOpenExisting(), DotNetDupe::WebAppCore::Builder::ValidateWebSocketHandshake(), DotNetDupe::Extensions::Logging::LoggerTextWriter::Write(), DotNetDupe::System::Diagnostics::EventLog::WriteEntry(), and DotNetDupe::System::Diagnostics::EventLog::WriteEntry().
|
static |
Definition at line 406 of file String.cpp.
References DotNetDupe::System::ArgumentOutOfRangeException::ArgumentOutOfRangeException(), String(), and Append().
|
static |
Definition at line 425 of file String.cpp.
|
static |
Definition at line 430 of file String.cpp.
References DotNetDupe::System::ArgumentOutOfRangeException::ArgumentOutOfRangeException(), String(), and Append().
| int DotNetDupe::System::String::LastIndexOf | ( | const String & | sStr, |
| bool | bIgnoreCase ) |
Definition at line 450 of file String.cpp.
References String(), GetLength(), and IsEmpty().
| int DotNetDupe::System::String::LastIndexOfAny | ( | int | iStartIndex, |
| std::initializer_list< char > | chChars, | ||
| bool | bIgnoreCase ) |
Definition at line 478 of file String.cpp.
References DotNetDupe::System::ArgumentOutOfRangeException::ArgumentOutOfRangeException(), DotNetDupe::System::FindLastCharIndex(), GetLength(), and IsEmpty().
|
inline |
Definition at line 122 of file String.h.
References GetRawString().
| void DotNetDupe::System::String::operator delete | ( | void * | p | ) |
Definition at line 133 of file String.cpp.
| void DotNetDupe::System::String::operator delete[] | ( | void * | p | ) |
Definition at line 141 of file String.cpp.
| void * DotNetDupe::System::String::operator new | ( | size_t | size | ) |
Definition at line 129 of file String.cpp.
| void * DotNetDupe::System::String::operator new[] | ( | size_t | size | ) |
Definition at line 137 of file String.cpp.
| String DotNetDupe::System::String::operator+ | ( | char | ch | ) | const |
Definition at line 153 of file String.cpp.
References String().
| String DotNetDupe::System::String::operator+ | ( | const char * | pStr | ) | const |
Definition at line 145 of file String.cpp.
References String().
| String & DotNetDupe::System::String::operator+= | ( | char | ch | ) |
Definition at line 171 of file String.cpp.
References String().
| String & DotNetDupe::System::String::operator+= | ( | const char * | pStr | ) |
Definition at line 164 of file String.cpp.
References String().
Definition at line 159 of file String.cpp.
References String(), and GetRawString().
|
inline |
Definition at line 127 of file String.h.
References String(), DOTNETDUPE_API, and GetRawString().
| String & DotNetDupe::System::String::operator= | ( | const char * | pStr | ) |
Assigns a null-terminated UTF-8 string to this instance.
| pStr | Null-terminated string pointer. |
Definition at line 225 of file String.cpp.
References DotNetDupe::System::ArgumentException::ArgumentException(), and String().
Copy assignment operator.
| sStr | String instance to assign. |
Definition at line 196 of file String.cpp.
References String().
| String & DotNetDupe::System::String::operator= | ( | const wchar_t * | pStr | ) |
Definition at line 217 of file String.cpp.
References DotNetDupe::System::ArgumentException::ArgumentException(), String(), and DotNetDupe::System::Utils::StringConvert::WCharToUtf8().
|
inline |
Definition at line 115 of file String.h.
References DotNetDupe::System::ArgumentException::ArgumentException(), String(), and DOTNETDUPE_API.
Move assignment operator.
| sStr | String instance to move from. |
Definition at line 204 of file String.cpp.
References String().
| char DotNetDupe::System::String::operator[] | ( | int | iIndex | ) | const |
Definition at line 256 of file String.cpp.
References DotNetDupe::System::ArgumentOutOfRangeException::ArgumentOutOfRangeException(), and GetRawString().
| String DotNetDupe::System::String::PadLeft | ( | int | iTotalWidth | ) |
Definition at line 488 of file String.cpp.
References String(), and PadLeft().
Referenced by PadLeft().
| String DotNetDupe::System::String::PadLeft | ( | int | iTotalWidth, |
| char | ch ) |
Definition at line 491 of file String.cpp.
References DotNetDupe::System::ArgumentException::ArgumentException(), String(), and GetLength().
| String DotNetDupe::System::String::PadRight | ( | int | iTotalWidth | ) |
Definition at line 504 of file String.cpp.
References String(), and PadRight().
Referenced by PadRight().
| String DotNetDupe::System::String::PadRight | ( | int | iTotalWidth, |
| char | ch ) |
Definition at line 507 of file String.cpp.
References DotNetDupe::System::ArgumentException::ArgumentException(), String(), and GetLength().
| String DotNetDupe::System::String::Remove | ( | int | iStartIndex | ) | const |
Definition at line 519 of file String.cpp.
References String(), GetLength(), and Remove().
Referenced by DotNetDupe::System::IO::Path::ChangeExtension(), DotNetDupe::System::IO::Path::Combine(), and Remove().
| String DotNetDupe::System::String::Remove | ( | int | iStartIndex, |
| int | iCount ) const |
Definition at line 522 of file String.cpp.
References DotNetDupe::System::ArgumentOutOfRangeException::ArgumentOutOfRangeException(), String(), and GetLength().
| String DotNetDupe::System::String::Replace | ( | char | chOriginalChar, |
| char | chReplaceChar ) const |
Definition at line 533 of file String.cpp.
References String().
Referenced by DotNetDupe::System::Guid::Guid().
| String DotNetDupe::System::String::Replace | ( | const String & | sOriginalStr, |
| const String & | sReplaceStr ) const |
Definition at line 539 of file String.cpp.
References String(), GetLength(), and IsEmpty().
Definition at line 552 of file String.cpp.
References String().
Referenced by DotNetDupe::System::IdentityModel::Tokens::Jwt::JWTToken::Parse(), and Split().
| Array< String > DotNetDupe::System::String::Split | ( | const Array< String > & | arrSeparators, |
| StringSplitOptions | eOptions = StringSplitOptions::None ) const |
Definition at line 598 of file String.cpp.
References DotNetDupe::System::Array< T >::GetData(), DotNetDupe::System::Array< T >::GetLength(), and Split().
| Array< String > DotNetDupe::System::String::Split | ( | const String * | pSeparator, |
| int | iCount, | ||
| StringSplitOptions | eOptions ) const |
Definition at line 602 of file String.cpp.
References String(), DotNetDupe::System::Array< T >::GetLength(), DotNetDupe::System::PopulateSplitCharSet(), and DotNetDupe::System::SplitByCharSet().
| bool DotNetDupe::System::String::StartsWith | ( | const String & | sPrefix | ) | const |
Definition at line 610 of file String.cpp.
References String(), and StartsWith().
Referenced by DotNetDupe::System::Net::Http::FileDownloader::FileDownloader(), DotNetDupe::WebAppCore::Controllers::ControllerBase::Authorize(), DotNetDupe::System::Environment::ExpandEnvironmentVariables(), DotNetDupe::System::IO::Path::GetPathRoot(), and StartsWith().
| bool DotNetDupe::System::String::StartsWith | ( | const String & | sPrefix, |
| bool | bIgnoreCase ) const |
Definition at line 614 of file String.cpp.
References String(), Compare(), and GetLength().
| String DotNetDupe::System::String::Substring | ( | int | iStartIndex | ) | const |
Definition at line 659 of file String.cpp.
References String(), GetLength(), and Substring().
Referenced by DotNetDupe::System::Guid::Guid(), DotNetDupe::System::IO::AppendPathSegment(), DotNetDupe::WebAppCore::Controllers::ControllerBase::Authorize(), DotNetDupe::System::Environment::ExpandEnvironmentVariables(), DotNetDupe::System::IO::Path::GetPathRoot(), DotNetDupe::System::Diagnostics::MatchProcessName(), DotNetDupe::System::ParseAndAddEnvEntry(), DotNetDupe::System::IO::StringReader::ReadLine(), DotNetDupe::System::IO::StringReader::ReadToEnd(), Substring(), and DotNetDupe::System::IO::Path::TrimEndingDirectorySeparator().
| String DotNetDupe::System::String::Substring | ( | int | iStartIndex, |
| int | iLength ) const |
Definition at line 663 of file String.cpp.
References DotNetDupe::System::ArgumentOutOfRangeException::ArgumentOutOfRangeException(), String(), and GetLength().
| String DotNetDupe::System::String::ToLower | ( | ) | const |
Definition at line 672 of file String.cpp.
References String().
Referenced by DotNetDupe::System::Net::Http::FileDownloader::FileDownloader(), DotNetDupe::System::Diagnostics::MatchProcessName(), DotNetDupe::System::ParseAuthorityComponents(), DotNetDupe::Extensions::Logging::ParseLogLevel(), DotNetDupe::System::Net::Http::HttpClient::Send(), and DotNetDupe::WebAppCore::Builder::ValidateWebSocketHandshake().
|
static |
Definition at line 655 of file String.cpp.
References String().
|
static |
Definition at line 651 of file String.cpp.
References String().
|
static |
Definition at line 643 of file String.cpp.
References String().
Referenced by FormatArgHelper(), DotNetDupe::System::OperatingSystem::GetVersionString(), and DotNetDupe::System::IO::StringWriter::ToString().
|
static |
Definition at line 647 of file String.cpp.
References String().
| String DotNetDupe::System::String::ToUpper | ( | ) | const |
Definition at line 680 of file String.cpp.
References String().
Referenced by DotNetDupe::System::Net::Http::HttpMethod::Equals().
| String DotNetDupe::System::String::Trim | ( | ) | const |
Definition at line 688 of file String.cpp.
References String(), TrimEnd(), and TrimStart().
Referenced by DotNetDupe::System::AddSplitToken().
| String DotNetDupe::System::String::TrimEnd | ( | ) | const |
| String DotNetDupe::System::String::TrimStart | ( | ) | const |
|
static |
Definition at line 637 of file String.cpp.
References String().
|
static |
Definition at line 628 of file String.cpp.
References String().
Referenced by FormatArgHelper(), FormatArgHelper(), FormatArgHelper(), FormatArgHelper(), FormatArgHelper(), FormatArgHelper(), FormatArgHelper(), and FromInt().
|
static |
Definition at line 633 of file String.cpp.
References String().