Class StringView
Represents static text view as a sequence of UTF-16 characters. Characters sequence might not be null-terminated.
Inheritance
Inherited Members
Assembly: FlaxEngine.dll
File: Engine/Core/Types/StringView.h
Syntax
public class StringView : public StringViewBase
Constructors
StringView(const Char* str)
Initializes a new instance of the StringView class.
Declaration
public StringView(const Char* str)
Parameters
Char
str
The characters sequence. If null, constructed StringView will be empty. |
StringView(const String& str)
Initializes a new instance of the StringView class.
Declaration
public StringView(const String& str)
Parameters
String
str
The reference to the string. |
Fields
Empty
Methods
EndsWith(const StringView& suffix, StringSearchCase searchCase=StringSearchCase::IgnoreCase)
Declaration
public bool EndsWith(const StringView& suffix, StringSearchCase searchCase=StringSearchCase::IgnoreCase) const
Parameters
StringView
suffix
|
StringSearchCase
searchCase
|
Returns
bool
|
Left(int32 count)
Gets the left most given number of characters.
Declaration
public StringView Left(int32 count) const
Parameters
int32
count
The characters count. |
Returns
StringView
The substring. |
operator!=(const Char* other)
Lexicographically test whether this string is not equivalent to the other given string (case sensitive).
Declaration
public bool operator!=(const Char* other) const
Parameters
Char
other
The other text. |
Returns
bool
True if this string is lexicographically is not equivalent to the other, otherwise false. |
operator!=(const String& other)
Lexicographically test whether this string is not equivalent to the other given string (case sensitive).
Declaration
public bool operator!=(const String& other) const
Parameters
String
other
The other text. |
Returns
bool
True if this string is lexicographically is not equivalent to the other, otherwise false. |
operator!=(const StringView& other)
Lexicographically test whether this string is not equivalent to the other given string (case sensitive).
Declaration
public bool operator!=(const StringView& other) const
Parameters
StringView
other
The other text. |
Returns
bool
True if this string is lexicographically is not equivalent to the other, otherwise false. |
operator=(const Char* str)
Assigns the static string.
Declaration
public StringView operator=(const Char* str)
Parameters
Char
str
The other string. |
Returns
StringView
The reference to this object. |
operator==(const Char* other)
Lexicographically test whether this string is equivalent to the other given string (case sensitive).
Declaration
public bool operator==(const Char* other) const
Parameters
Char
other
The other text. |
Returns
bool
True if this string is lexicographically equivalent to the other, otherwise false. |
operator==(const String& other)
Lexicographically test whether this string is equivalent to the other given string (case sensitive).
Declaration
public bool operator==(const String& other) const
Parameters
String
other
The other text. |
Returns
bool
True if this string is lexicographically equivalent to the other, otherwise false. |
operator==(const StringView& other)
Lexicographically test whether this string is equivalent to the other given string (case sensitive).
Declaration
public bool operator==(const StringView& other) const
Parameters
StringView
other
The other text. |
Returns
bool
True if this string is lexicographically equivalent to the other, otherwise false. |
Right(int32 count)
Gets the string of characters from the right (end of the string).
Declaration
public StringView Right(int32 count) const
Parameters
int32
count
The characters count. |
Returns
StringView
The substring. |
StartsWith(const StringView& prefix, StringSearchCase searchCase=StringSearchCase::IgnoreCase)
Declaration
public bool StartsWith(const StringView& prefix, StringSearchCase searchCase=StringSearchCase::IgnoreCase) const
Parameters
StringView
prefix
|
StringSearchCase
searchCase
|
Returns
bool
|
StringView()
Initializes a new instance of the StringView class.
Declaration
public constexpr StringView()
Returns
constexpr
|
StringView(const Char* str, int32 length)
Initializes a new instance of the StringView class.
Declaration
public constexpr StringView(const Char* str, int32 length)
Parameters
Char
str
The characters sequence. Can be null if length is zero. |
int32
length
The characters sequence length (excluding null-terminator character). |
Returns
constexpr
|
StringView(const StringView& str)
Initializes a new instance of the StringView class.
Declaration
public constexpr StringView(const StringView& str)
Parameters
StringView
str
The reference to the static string. |
Returns
constexpr
|
Substring(int32 startIndex)
Retrieves substring created from characters starting from startIndex to the String end.
Declaration
public StringView Substring(int32 startIndex) const
Parameters
int32
startIndex
The index of the first character to subtract. |
Returns
StringView
The substring created from String data. |
Substring(int32 startIndex, int32 count)
Retrieves substring created from characters starting from start index.
Declaration
public StringView 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
StringView
The substring created from String data. |