DotNetDupe 4.0.6
C++17/20 Implementation of the .NET Base Class Library (BCL)
Loading...
Searching...
No Matches
DotNetDupe::System::String Class Reference

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 ()
StringAppend (const char ch)
StringAppend (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)
StringInsert (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
Stringoperator+= (char ch)
Stringoperator+= (const char *pStr)
Stringoperator+= (const String &sStr)
bool operator< (const String &sStr) const
Stringoperator= (const char *pStr)
 Assigns a null-terminated UTF-8 string to this instance.
Stringoperator= (const String &sStr)
 Copy assignment operator.
Stringoperator= (const wchar_t *pStr)
Stringoperator= (std::nullptr_t)
Stringoperator= (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< StringSplit (char chSeparator) const
Array< StringSplit (const Array< String > &arrSeparators, StringSplitOptions eOptions=StringSplitOptions::None) const
Array< StringSplit (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)

Detailed Description

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.

Note
Conforms to ECMA-335 Partition IV Section 5.4 (System.String).
Implemented using the Pimpl idiom to guarantee ABI stability across library boundaries.
See also
Char, StringBuilder

Definition at line 74 of file String.h.

Constructor & Destructor Documentation

◆ String() [1/7]

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().

◆ String() [2/7]

DotNetDupe::System::String::String ( const char * pStr)

Initializes a new instance of the String class from a null-terminated UTF-8 string.

Parameters
pStrNull-terminated C-string pointer.

Definition at line 188 of file String.cpp.

References DotNetDupe::System::ArgumentException::ArgumentException().

◆ String() [3/7]

DotNetDupe::System::String::String ( const String & sStr)

Copy constructor.

Parameters
sStrString instance to copy.

Definition at line 194 of file String.cpp.

References String().

◆ String() [4/7]

DotNetDupe::System::String::String ( String && sStr)
noexcept

Move constructor.

Parameters
sStrString instance to move.

Definition at line 203 of file String.cpp.

References String().

◆ ~String()

DotNetDupe::System::String::~String ( )

Definition at line 65 of file String.cpp.

◆ String() [5/7]

DotNetDupe::System::String::String ( const wchar_t * pStr)

◆ String() [6/7]

DotNetDupe::System::String::String ( std::nullptr_t )
inline

◆ String() [7/7]

DotNetDupe::System::String::String ( int nNull)
inline

Member Function Documentation

◆ Append() [1/2]

String & DotNetDupe::System::String::Append ( const char ch)

◆ Append() [2/2]

String & DotNetDupe::System::String::Append ( const String & sStr)

Definition at line 384 of file String.cpp.

References String(), and GetRawString().

◆ Clone()

String DotNetDupe::System::String::Clone ( ) const

Definition at line 251 of file String.cpp.

References String(), and GetRawString().

◆ Compare()

int DotNetDupe::System::String::Compare ( const String & sStr1,
int iIndex1,
const String & sStr2,
int iIndex2,
int iLength,
bool bIgnoreCase )
static

Definition at line 268 of file String.cpp.

References String(), and DotNetDupe::System::ToLowerString().

Referenced by EndsWith(), and StartsWith().

◆ CompareTo()

int DotNetDupe::System::String::CompareTo ( const String & sStr) const

Definition at line 277 of file String.cpp.

References String(), and GetRawString().

◆ Concat()

String DotNetDupe::System::String::Concat ( const std::initializer_list< String > sStrs) const

Definition at line 280 of file String.cpp.

References String().

Referenced by operator+().

◆ Contains() [1/2]

bool DotNetDupe::System::String::Contains ( char ch) const

◆ Contains() [2/2]

bool DotNetDupe::System::String::Contains ( const String & sStr) const

Definition at line 295 of file String.cpp.

References String().

◆ CopyTo()

void DotNetDupe::System::String::CopyTo ( int iSourceIndex,
char * pDestination,
int iDestinationIndex,
int iDestArraySize,
int iCount ) const

◆ EndsWith() [1/2]

◆ EndsWith() [2/2]

bool DotNetDupe::System::String::EndsWith ( const String & sSuffix,
bool bIgnoreCase ) const

Definition at line 323 of file String.cpp.

References String(), Compare(), and GetLength().

◆ Equals() [1/2]

bool DotNetDupe::System::String::Equals ( const String & sStr) const

Definition at line 338 of file String.cpp.

References String().

◆ Equals() [2/2]

bool DotNetDupe::System::String::Equals ( const String & sStr1,
const String & sStr2 )
static

◆ Format() [1/4]

String DotNetDupe::System::String::Format ( const char * pFormat)
inlinestatic

Definition at line 243 of file String.h.

References String(), and InternalFormat().

◆ Format() [2/4]

◆ Format() [3/4]

String DotNetDupe::System::String::Format ( const String & sFormat)
inlinestatic

Definition at line 246 of file String.h.

References String(), Format(), and GetRawString().

◆ Format() [4/4]

template<typename Arg1, typename... Args>
String DotNetDupe::System::String::Format ( const String & sFormat,
const Arg1 & arg1,
const Args &... args )
inlinestatic

Definition at line 250 of file String.h.

References String(), Format(), and GetRawString().

◆ FormatArgHelper() [1/16]

String DotNetDupe::System::String::FormatArgHelper ( bool b)
inlinestatic

Definition at line 218 of file String.h.

References String().

Referenced by Format().

◆ FormatArgHelper() [2/16]

String DotNetDupe::System::String::FormatArgHelper ( char c)
inlinestatic

Definition at line 222 of file String.h.

References String().

◆ FormatArgHelper() [3/16]

String DotNetDupe::System::String::FormatArgHelper ( const char * s)
inlinestatic

Definition at line 221 of file String.h.

References String().

◆ FormatArgHelper() [4/16]

String DotNetDupe::System::String::FormatArgHelper ( const String & s)
inlinestatic

Definition at line 220 of file String.h.

References String().

◆ FormatArgHelper() [5/16]

template<typename T>
String DotNetDupe::System::String::FormatArgHelper ( const T & arg)
inlinestatic

Definition at line 234 of file String.h.

References String(), and ToString().

◆ FormatArgHelper() [6/16]

String DotNetDupe::System::String::FormatArgHelper ( double d)
inlinestatic

Definition at line 232 of file String.h.

References String(), and ValueOf().

◆ FormatArgHelper() [7/16]

String DotNetDupe::System::String::FormatArgHelper ( float f)
inlinestatic

Definition at line 231 of file String.h.

References String(), and ValueOf().

◆ FormatArgHelper() [8/16]

String DotNetDupe::System::String::FormatArgHelper ( int i)
inlinestatic

Definition at line 225 of file String.h.

References String(), and FromInt().

◆ FormatArgHelper() [9/16]

String DotNetDupe::System::String::FormatArgHelper ( long l)
inlinestatic

Definition at line 227 of file String.h.

References String(), and ValueOf().

◆ FormatArgHelper() [10/16]

String DotNetDupe::System::String::FormatArgHelper ( long long ll)
inlinestatic

Definition at line 229 of file String.h.

References String(), and ValueOf().

◆ FormatArgHelper() [11/16]

String DotNetDupe::System::String::FormatArgHelper ( short i)
inlinestatic

Definition at line 223 of file String.h.

References String(), and FromInt().

◆ FormatArgHelper() [12/16]

String DotNetDupe::System::String::FormatArgHelper ( std::nullptr_t )
inlinestatic

Definition at line 219 of file String.h.

References String().

◆ FormatArgHelper() [13/16]

String DotNetDupe::System::String::FormatArgHelper ( unsigned int u)
inlinestatic

Definition at line 226 of file String.h.

References String(), and ValueOf().

◆ FormatArgHelper() [14/16]

String DotNetDupe::System::String::FormatArgHelper ( unsigned long long ull)
inlinestatic

Definition at line 230 of file String.h.

References String(), and ValueOf().

◆ FormatArgHelper() [15/16]

String DotNetDupe::System::String::FormatArgHelper ( unsigned long ul)
inlinestatic

Definition at line 228 of file String.h.

References String(), and ValueOf().

◆ FormatArgHelper() [16/16]

String DotNetDupe::System::String::FormatArgHelper ( unsigned short i)
inlinestatic

Definition at line 224 of file String.h.

References String(), and FromInt().

◆ FromInt()

String DotNetDupe::System::String::FromInt ( int iValue)
static

Definition at line 624 of file String.cpp.

References String(), and ValueOf().

Referenced by FormatArgHelper(), FormatArgHelper(), and FormatArgHelper().

◆ GetChars()

const char * DotNetDupe::System::String::GetChars ( ) const

Definition at line 233 of file String.cpp.

References GetRawString().

◆ GetHashCode()

int DotNetDupe::System::String::GetHashCode ( ) const

Definition at line 236 of file String.cpp.

References GetRawString().

Referenced by DotNetDupe::System::HashHelper< String >::GetHashCode().

◆ GetLength()

◆ GetRawString()

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().

◆ IndexOf() [1/3]

int DotNetDupe::System::String::IndexOf ( const String & sSubstring) const

◆ IndexOf() [2/3]

int DotNetDupe::System::String::IndexOf ( const String & sSubstring,
bool bIgnoreCase ) const

Definition at line 344 of file String.cpp.

References String(), and IndexOf().

◆ IndexOf() [3/3]

int DotNetDupe::System::String::IndexOf ( const String & sSubstring,
int iStartIndex,
bool bIgnoreCase ) const

◆ IndexOfAny()

int DotNetDupe::System::String::IndexOfAny ( int iStartIndex,
std::initializer_list< char > chChars )

◆ Insert()

String & DotNetDupe::System::String::Insert ( int iIndex,
const String & sStr )

◆ InternalFormat()

String DotNetDupe::System::String::InternalFormat ( const char * pFormat,
const String * pArgs,
int iArgCount )
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().

Referenced by Format(), and Format().

◆ IsEmpty()

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().

◆ Join() [1/4]

String DotNetDupe::System::String::Join ( char chSeparator,
std::initializer_list< String > sStrings )
static

Definition at line 402 of file String.cpp.

References String(), and Join().

Referenced by Join(), and Join().

◆ Join() [2/4]

String DotNetDupe::System::String::Join ( char chSeparator,
std::initializer_list< String > sStrings,
int iStartIndex,
int iCount )
static

◆ Join() [3/4]

String DotNetDupe::System::String::Join ( const String & sSeparator,
std::initializer_list< String > sStrings )
static

Definition at line 425 of file String.cpp.

References String(), and Join().

◆ Join() [4/4]

String DotNetDupe::System::String::Join ( const String & sSeparator,
std::initializer_list< String > sStrings,
int iStartIndex,
int iCount )
static

◆ LastIndexOf()

int DotNetDupe::System::String::LastIndexOf ( const String & sStr,
bool bIgnoreCase )

Definition at line 450 of file String.cpp.

References String(), GetLength(), and IsEmpty().

◆ LastIndexOfAny()

int DotNetDupe::System::String::LastIndexOfAny ( int iStartIndex,
std::initializer_list< char > chChars,
bool bIgnoreCase )

◆ operator const char *()

DotNetDupe::System::String::operator const char * ( ) const
inline

Definition at line 122 of file String.h.

References GetRawString().

◆ operator delete()

void DotNetDupe::System::String::operator delete ( void * p)

Definition at line 133 of file String.cpp.

◆ operator delete[]()

void DotNetDupe::System::String::operator delete[] ( void * p)

Definition at line 141 of file String.cpp.

◆ operator new()

void * DotNetDupe::System::String::operator new ( size_t size)

Definition at line 129 of file String.cpp.

◆ operator new[]()

void * DotNetDupe::System::String::operator new[] ( size_t size)

Definition at line 137 of file String.cpp.

◆ operator+() [1/3]

String DotNetDupe::System::String::operator+ ( char ch) const

Definition at line 153 of file String.cpp.

References String().

◆ operator+() [2/3]

String DotNetDupe::System::String::operator+ ( const char * pStr) const

Definition at line 145 of file String.cpp.

References String().

◆ operator+() [3/3]

String DotNetDupe::System::String::operator+ ( const String & sStr) const

Definition at line 288 of file String.cpp.

References String(), and Concat().

Referenced by operator+, and operator+.

◆ operator+=() [1/3]

String & DotNetDupe::System::String::operator+= ( char ch)

Definition at line 171 of file String.cpp.

References String().

◆ operator+=() [2/3]

String & DotNetDupe::System::String::operator+= ( const char * pStr)

Definition at line 164 of file String.cpp.

References String().

◆ operator+=() [3/3]

String & DotNetDupe::System::String::operator+= ( const String & sStr)

Definition at line 159 of file String.cpp.

References String(), and GetRawString().

◆ operator<()

bool DotNetDupe::System::String::operator< ( const String & sStr) const
inline

Definition at line 127 of file String.h.

References String(), DOTNETDUPE_API, and GetRawString().

◆ operator=() [1/5]

String & DotNetDupe::System::String::operator= ( const char * pStr)

Assigns a null-terminated UTF-8 string to this instance.

Parameters
pStrNull-terminated string pointer.
Returns
Reference to this String instance.

Definition at line 225 of file String.cpp.

References DotNetDupe::System::ArgumentException::ArgumentException(), and String().

◆ operator=() [2/5]

String & DotNetDupe::System::String::operator= ( const String & sStr)

Copy assignment operator.

Parameters
sStrString instance to assign.
Returns
Reference to this String instance.

Definition at line 196 of file String.cpp.

References String().

◆ operator=() [3/5]

String & DotNetDupe::System::String::operator= ( const wchar_t * pStr)

◆ operator=() [4/5]

String & DotNetDupe::System::String::operator= ( std::nullptr_t )
inline

◆ operator=() [5/5]

String & DotNetDupe::System::String::operator= ( String && sStr)
noexcept

Move assignment operator.

Parameters
sStrString instance to move from.
Returns
Reference to this String instance.

Definition at line 204 of file String.cpp.

References String().

◆ operator[]()

char DotNetDupe::System::String::operator[] ( int iIndex) const

◆ PadLeft() [1/2]

String DotNetDupe::System::String::PadLeft ( int iTotalWidth)

Definition at line 488 of file String.cpp.

References String(), and PadLeft().

Referenced by PadLeft().

◆ PadLeft() [2/2]

String DotNetDupe::System::String::PadLeft ( int iTotalWidth,
char ch )

◆ PadRight() [1/2]

String DotNetDupe::System::String::PadRight ( int iTotalWidth)

Definition at line 504 of file String.cpp.

References String(), and PadRight().

Referenced by PadRight().

◆ PadRight() [2/2]

String DotNetDupe::System::String::PadRight ( int iTotalWidth,
char ch )

◆ Remove() [1/2]

String DotNetDupe::System::String::Remove ( int iStartIndex) const

◆ Remove() [2/2]

String DotNetDupe::System::String::Remove ( int iStartIndex,
int iCount ) const

◆ Replace() [1/2]

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().

◆ Replace() [2/2]

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().

◆ Split() [1/3]

Array< String > DotNetDupe::System::String::Split ( char chSeparator) const

Definition at line 552 of file String.cpp.

References String().

Referenced by DotNetDupe::System::IdentityModel::Tokens::Jwt::JWTToken::Parse(), and Split().

◆ Split() [2/3]

Array< String > DotNetDupe::System::String::Split ( const Array< String > & arrSeparators,
StringSplitOptions eOptions = StringSplitOptions::None ) const

◆ Split() [3/3]

Array< String > DotNetDupe::System::String::Split ( const String * pSeparator,
int iCount,
StringSplitOptions eOptions ) const

◆ StartsWith() [1/2]

◆ StartsWith() [2/2]

bool DotNetDupe::System::String::StartsWith ( const String & sPrefix,
bool bIgnoreCase ) const

Definition at line 614 of file String.cpp.

References String(), Compare(), and GetLength().

◆ Substring() [1/2]

◆ Substring() [2/2]

String DotNetDupe::System::String::Substring ( int iStartIndex,
int iLength ) const

◆ ToLower()

◆ ToString() [1/4]

String DotNetDupe::System::String::ToString ( bool bValue)
static

Definition at line 655 of file String.cpp.

References String().

◆ ToString() [2/4]

String DotNetDupe::System::String::ToString ( double dValue)
static

Definition at line 651 of file String.cpp.

References String().

◆ ToString() [3/4]

String DotNetDupe::System::String::ToString ( int iValue)
static

◆ ToString() [4/4]

String DotNetDupe::System::String::ToString ( long long llValue)
static

Definition at line 647 of file String.cpp.

References String().

◆ ToUpper()

String DotNetDupe::System::String::ToUpper ( ) const

Definition at line 680 of file String.cpp.

References String().

Referenced by DotNetDupe::System::Net::Http::HttpMethod::Equals().

◆ Trim()

String DotNetDupe::System::String::Trim ( ) const

Definition at line 688 of file String.cpp.

References String(), TrimEnd(), and TrimStart().

Referenced by DotNetDupe::System::AddSplitToken().

◆ TrimEnd()

String DotNetDupe::System::String::TrimEnd ( ) const

Definition at line 700 of file String.cpp.

References String().

Referenced by Trim().

◆ TrimStart()

String DotNetDupe::System::String::TrimStart ( ) const

Definition at line 692 of file String.cpp.

References String().

Referenced by Trim().

◆ ValueOf() [1/3]

String DotNetDupe::System::String::ValueOf ( double dValue)
static

Definition at line 637 of file String.cpp.

References String().

◆ ValueOf() [2/3]

String DotNetDupe::System::String::ValueOf ( int iValue)
static

◆ ValueOf() [3/3]

String DotNetDupe::System::String::ValueOf ( long long llValue)
static

Definition at line 633 of file String.cpp.

References String().


The documentation for this class was generated from the following files: