• Documentation
  • Manual
  • C# API
  • C++ API
  • C++ API
Search Results for

    Show / Hide Table of Contents

    Class StringAnsi

    Represents text as a sequence of ANSI characters. Container uses a single dynamic memory allocation to store the characters data. Characters sequence is always null-terminated.

    Inheritance
    StringBase
    StringAnsi
    Inherited Members
    StringBase::_data
    StringBase::_length
    StringAnsi
    StringBase::Clear()
    StringBase::Compare(const StringBase& str, StringSearchCase searchCase=StringSearchCase::CaseSensitive)
    StringBase::Contains(const T* subStr, StringSearchCase searchCase=StringSearchCase::CaseSensitive)
    StringBase::Contains(const StringBase& subStr, StringSearchCase searchCase=StringSearchCase::CaseSensitive)
    StringBase::EndsWith(T c, StringSearchCase searchCase=StringSearchCase::CaseSensitive)
    StringBase::EndsWith(const StringBase& suffix, StringSearchCase searchCase=StringSearchCase::CaseSensitive)
    StringBase::Find(T c)
    StringBase::Find(const T* subStr, StringSearchCase searchCase=StringSearchCase::CaseSensitive, int32 startPosition=-1)
    StringBase::Find(const StringBase& subStr, StringSearchCase searchCase=StringSearchCase::CaseSensitive, int32 startPosition=-1)
    StringBase::FindFirstOf(T c, int32 startPos = 0)
    StringBase::FindFirstOf(const T* str, int32 startPos = 0)
    StringBase::FindLast(T c)
    StringBase::FindLast(const T* subStr, StringSearchCase searchCase=StringSearchCase::CaseSensitive, int32 startPosition=-1)
    StringBase::FindLast(const StringBase& subStr, StringSearchCase searchCase=StringSearchCase::CaseSensitive, int32 startPosition=-1)
    StringBase::Get()
    StringBase::GetText()
    StringBase::HasChars()
    StringBase::IsEmpty()
    StringBase::Length()
    StringBase::operator*()
    StringAnsi
    StringBase::operator[](int32 index)
    StringBase::Replace(T searchChar, T replacementChar, StringSearchCase searchCase=StringSearchCase::CaseSensitive)
    StringBase::Replace(const T* searchText, const T* replacementText, StringSearchCase searchCase=StringSearchCase::CaseSensitive)
    StringBase::Replace(const T* searchText, int32 searchTextLength, const T* replacementText, int32 replacementTextLength, StringSearchCase searchCase=StringSearchCase::CaseSensitive)
    StringBase::ReserveSpace(int32 length)
    StringBase::Resize(int32 length)
    StringBase::Reverse()
    StringBase::StartsWith(T c, StringSearchCase searchCase=StringSearchCase::CaseSensitive)
    StringBase::StartsWith(const StringBase& prefix, StringSearchCase searchCase=StringSearchCase::CaseSensitive)
    StringBase::~StringBase()
    Assembly: FlaxEngine.dll
    File: Engine/Core/Types/String.h
    Syntax
    public class StringAnsi : public StringBase

    Constructors

    StringAnsi()

    Initializes a new instance of the StringAnsi class.

    Declaration
    public StringAnsi() = default

    StringAnsi(const Char* str)

    Initializes a new instance of the StringAnsi class.

    Declaration
    public StringAnsi(const Char* str)
    Parameters
    Char str

    ANSI string

    StringAnsi(const char* str)

    Initializes a new instance of the StringAnsi class.

    Declaration
    public StringAnsi(const char* str)
    Parameters
    char str

    The UTF-16 string.

    StringAnsi(const char* str, int32 length)

    Initializes a new instance of the StringAnsi class.

    Declaration
    public StringAnsi(const char* str, int32 length)
    Parameters
    char str

    The ANSI string.

    int32 length

    The ANSI string length.

    StringAnsi(const Char* str, int32 length)

    Initializes a new instance of the StringAnsi class.

    Declaration
    public StringAnsi(const Char* str, int32 length)
    Parameters
    Char str

    The UTF-16 string.

    int32 length

    The UTF-16 string length.

    StringAnsi(const String& str)

    Initializes a new instance of the StringAnsi class.

    Declaration
    public StringAnsi(const String& str)
    Parameters
    String str

    The reference to the string.

    StringAnsi(const StringAnsi& str)

    Initializes a new instance of the StringAnsi class.

    Declaration
    public StringAnsi(const StringAnsi& str)
    Parameters
    StringAnsi str

    The reference to the string.

    StringAnsi(const StringAnsiView& str)

    Initializes a new instance of the StringAnsi class.

    Declaration
    public StringAnsi(const StringAnsiView& str)
    Parameters
    StringAnsiView str

    The other string.

    StringAnsi(const StringView& str)

    Initializes a new instance of the StringAnsi class.

    Declaration
    public StringAnsi(const StringView& str)
    Parameters
    StringView str

    The other string.

    StringAnsi(StringAnsi&& str)

    Initializes a new instance of the StringAnsi class.

    Declaration
    public StringAnsi(StringAnsi&& str) noexcept
    Parameters
    StringAnsi str

    The double reference to the string.

    Fields

    Empty

    Instance of the empty string.

    Declaration
    public static StringAnsi Empty
    Field Value
    StringAnsi

    Methods

    Append(const char c)

    Appends the specified character to this string.

    Declaration
    public StringAnsi Append(const char c)
    Parameters
    char c

    The character to append.

    Returns
    StringAnsi

    The reference to this string.

    Append(const char* chars, int32 count)

    Appends an array of characters to the string.

    Declaration
    public void Append(const char* chars, int32 count)
    Parameters
    char chars

    The array of characters to append. It does not need be null-terminated, and null characters are not treated specially.

    int32 count

    The number of characters to append.

    Append(const Char* chars, int32 count)

    Appends an array of characters to the string.

    Declaration
    public void Append(const Char* chars, int32 count)
    Parameters
    Char chars

    The array of characters to append. It does not need be null-terminated, and null characters are not treated specially.

    int32 count

    The number of characters to append.

    Append(const StringAnsi& text)

    Appends the specified text to this string.

    Declaration
    public StringAnsi Append(const StringAnsi& text)
    Parameters
    StringAnsi text

    The text to append.

    Returns
    StringAnsi

    The reference to this string.

    EndsWith(const StringAnsiView& suffix, StringSearchCase searchCase=StringSearchCase::CaseSensitive)

    Declaration
    public bool EndsWith(const StringAnsiView& suffix, StringSearchCase searchCase=StringSearchCase::CaseSensitive) const
    Parameters
    StringAnsiView suffix

    StringSearchCase searchCase

    Returns
    bool

    Format(const char* format, const Args& ... args)

    Formats the message and gets it as a string.

    Declaration
    public static StringAnsi Format(const char* format, const Args& ... args)
    Parameters
    char format

    The format string.

    Args... args

    The custom arguments.

    Returns
    StringAnsi

    The formatted text.

    Type Parameters
    Args

    Insert(int32 startIndex, const StringAnsi& other)

    Inserts string into current string instance at given location.

    Declaration
    public void Insert(int32 startIndex, const StringAnsi& other)
    Parameters
    int32 startIndex

    The index of the first character to insert.

    StringAnsi other

    The string to insert.

    Left(int32 count)

    Gets the left most given number of characters.

    Declaration
    public StringAnsi Left(int32 count) const
    Parameters
    int32 count

    The characters count.

    Returns
    StringAnsi

    The substring.

    operator!=(const char* other)

    Declaration
    public bool operator!=(const char* other) const
    Parameters
    char other

    Returns
    bool

    operator!=(const StringAnsi& other)

    Declaration
    public bool operator!=(const StringAnsi& other) const
    Parameters
    StringAnsi other

    Returns
    bool

    operator+=(const char c)

    Appends the specified character to this string.

    Declaration
    public StringAnsi operator+=(const char c)
    Parameters
    char c

    The character to append.

    Returns
    StringAnsi

    The reference to this string.

    operator+=(const char* str)

    Appends the specified text to this string.

    Declaration
    public StringAnsi operator+=(const char* str)
    Parameters
    char str

    The text to append.

    Returns
    StringAnsi

    The reference to this string.

    operator+=(const Char* str)

    Appends the specified text to this string.

    Declaration
    public StringAnsi operator+=(const Char* str)
    Parameters
    Char str

    The text to append.

    Returns
    StringAnsi

    The reference to this string.

    operator+=(const StringAnsi& str)

    Appends the specified text to this string.

    Declaration
    public StringAnsi operator+=(const StringAnsi& str)
    Parameters
    StringAnsi str

    The text to append.

    Returns
    StringAnsi

    The reference to this string.

    operator+=(const StringAnsiView& str)

    Appends the specified text to this string.

    Declaration
    public StringAnsi operator+=(const StringAnsiView& str)
    Parameters
    StringAnsiView str

    The text to append.

    Returns
    StringAnsi

    The reference to this string.

    operator<(const char* other)

    Declaration
    public bool operator<(const char* other) const
    Parameters
    char other

    Returns
    bool

    operator<(const StringAnsi& other)

    Declaration
    public bool operator<(const StringAnsi& other) const
    Parameters
    StringAnsi other

    Returns
    bool

    operator<=(const char* other)

    Declaration
    public bool operator<=(const char* other) const
    Parameters
    char other

    Returns
    bool

    operator<=(const StringAnsi& other)

    Declaration
    public bool operator<=(const StringAnsi& other) const
    Parameters
    StringAnsi other

    Returns
    bool

    operator=(const char c)

    Sets the text value.

    Declaration
    public StringAnsi operator=(const char c)
    Parameters
    char c

    The other character.

    Returns
    StringAnsi

    The reference to this.

    operator=(const char* str)

    Sets the text value.

    Declaration
    public StringAnsi operator=(const char* str)
    Parameters
    char str

    The other string.

    Returns
    StringAnsi

    The reference to this.

    operator=(const Char* str)

    Sets the text value.

    Declaration
    public StringAnsi operator=(const Char* str)
    Parameters
    Char str

    The other string.

    Returns
    StringAnsi

    The reference to this.

    operator=(const StringAnsi& s)

    Sets the text value.

    Declaration
    public StringAnsi operator=(const StringAnsi& s)
    Parameters
    StringAnsi s

    The other string.

    Returns
    StringAnsi

    The reference to this.

    operator=(const StringAnsiView& s)

    Sets the text value.

    Declaration
    public StringAnsi operator=(const StringAnsiView& s)
    Parameters
    StringAnsiView s

    The other string.

    Returns
    StringAnsi

    The reference to this.

    operator=(StringAnsi&& s)

    Sets the text value.

    Declaration
    public StringAnsi operator=(StringAnsi&& s) noexcept
    Parameters
    StringAnsi s

    The other string.

    Returns
    StringAnsi

    The reference to this.

    operator==(const char* other)

    Declaration
    public bool operator==(const char* other) const
    Parameters
    char other

    Returns
    bool

    operator==(const StringAnsi& other)

    Declaration
    public bool operator==(const StringAnsi& other) const
    Parameters
    StringAnsi other

    Returns
    bool

    operator>(const char* other)

    Declaration
    public bool operator>(const char* other) const
    Parameters
    char other

    Returns
    bool

    operator>(const StringAnsi& other)

    Declaration
    public bool operator>(const StringAnsi& other) const
    Parameters
    StringAnsi other

    Returns
    bool

    operator>=(const char* other)

    Declaration
    public bool operator>=(const char* other) const
    Parameters
    char other

    Returns
    bool

    operator>=(const StringAnsi& other)

    Declaration
    public bool operator>=(const StringAnsi& other) const
    Parameters
    StringAnsi other

    Returns
    bool

    Remove(int32 startIndex, int32 length)

    Removes characters from the string at given location and length.

    Declaration
    public void Remove(int32 startIndex, int32 length)
    Parameters
    int32 startIndex

    The index of the first character to remove.

    int32 length

    The amount of characters to remove.

    Right(int32 count)

    Gets the string of characters from the right (end of the string).

    Declaration
    public StringAnsi Right(int32 count) const
    Parameters
    int32 count

    The characters count.

    Returns
    StringAnsi

    The substring.

    Set(const char* chars, int32 length)

    Sets an array of characters to the string.

    Declaration
    public void Set(const char* chars, int32 length)
    Parameters
    char chars

    The pointer to the start of an array of characters to set (ANSI). This array need not be null-terminated, and null characters are not treated specially.

    int32 length

    The number of characters to assign.

    Set(const Char* chars, int32 length)

    Sets an array of characters to the string.

    Declaration
    public void Set(const Char* chars, int32 length)
    Parameters
    Char chars

    The pointer to the start of an array of characters to set (UTF-16). This array need not be null-terminated, and null characters are not treated specially.

    int32 length

    The number of characters to assign.

    Split(char c, Array<StringAnsi, HeapAllocation>& results)

    Splits a string into substrings that are based on the character.

    Declaration
    public void Split(char c, Array<StringAnsi, HeapAllocation>& results) const
    Parameters
    char c

    A character that delimits the substrings in this string.

    Array<StringAnsi, HeapAllocation> results

    An array whose elements contain the substrings from this instance that are delimited by separator.

    StartsWith(const StringAnsiView& prefix, StringSearchCase searchCase=StringSearchCase::CaseSensitive)

    Declaration
    public bool StartsWith(const StringAnsiView& prefix, StringSearchCase searchCase=StringSearchCase::CaseSensitive) const
    Parameters
    StringAnsiView prefix

    StringSearchCase searchCase

    Returns
    bool

    Substring(int32 startIndex)

    Retrieves substring created from characters starting from startIndex to the String end.

    Declaration
    public StringAnsi Substring(int32 startIndex) const
    Parameters
    int32 startIndex

    The index of the first character to subtract.

    Returns
    StringAnsi

    The substring created from String data.

    Substring(int32 startIndex, int32 count)

    Retrieves substring created from characters starting from start index.

    Declaration
    public StringAnsi Substring(int32 startIndex, int32 count) const
    Parameters
    int32 startIndex

    The index of the first character to subtract.

    int32 count

    The amount of characters to retrieve.

    Returns
    StringAnsi

    The substring created from String data.

    ToLower()

    Converts all uppercase characters to lowercase.

    Declaration
    public StringAnsi ToLower() const
    Returns
    StringAnsi

    The lowercase string.

    ToString()

    Declaration
    public String ToString() const
    Returns
    String

    ToStringAnsi()

    Declaration
    public StringAnsi ToStringAnsi() const
    Returns
    StringAnsi

    ToUpper()

    Converts all lowercase characters to uppercase.

    Declaration
    public StringAnsi ToUpper() const
    Returns
    StringAnsi

    The uppercase string.

    • Improve this Doc
    • View Source
    In This Article
    • Constructors
      • StringAnsi()
      • StringAnsi(const Char* str)
      • StringAnsi(const char* str)
      • StringAnsi(const char* str, int32 length)
      • StringAnsi(const Char* str, int32 length)
      • StringAnsi(const String& str)
      • StringAnsi(const StringAnsi& str)
      • StringAnsi(const StringAnsiView& str)
      • StringAnsi(const StringView& str)
      • StringAnsi(StringAnsi&& str)
    • Fields
      • Empty
    • Methods
      • Append(const char c)
      • Append(const char* chars, int32 count)
      • Append(const Char* chars, int32 count)
      • Append(const StringAnsi& text)
      • EndsWith(const StringAnsiView& suffix, StringSearchCase searchCase=StringSearchCase::CaseSensitive)
      • Format(const char* format, const Args& ... args)
      • Insert(int32 startIndex, const StringAnsi& other)
      • Left(int32 count)
      • operator!=(const char* other)
      • operator!=(const StringAnsi& other)
      • operator+=(const char c)
      • operator+=(const char* str)
      • operator+=(const Char* str)
      • operator+=(const StringAnsi& str)
      • operator+=(const StringAnsiView& str)
      • operator<(const char* other)
      • operator<(const StringAnsi& other)
      • operator<=(const char* other)
      • operator<=(const StringAnsi& other)
      • operator=(const char c)
      • operator=(const char* str)
      • operator=(const Char* str)
      • operator=(const StringAnsi& s)
      • operator=(const StringAnsiView& s)
      • operator=(StringAnsi&& s)
      • operator==(const char* other)
      • operator==(const StringAnsi& other)
      • operator>(const char* other)
      • operator>(const StringAnsi& other)
      • operator>=(const char* other)
      • operator>=(const StringAnsi& other)
      • Remove(int32 startIndex, int32 length)
      • Right(int32 count)
      • Set(const char* chars, int32 length)
      • Set(const Char* chars, int32 length)
      • Split(char c, Array<StringAnsi, HeapAllocation>& results)
      • StartsWith(const StringAnsiView& prefix, StringSearchCase searchCase=StringSearchCase::CaseSensitive)
      • Substring(int32 startIndex)
      • Substring(int32 startIndex, int32 count)
      • ToLower()
      • ToString()
      • ToStringAnsi()
      • ToUpper()
    Back to top Copyright © 2012-2024 Wojciech Figat