Fixed-size UTF32 string. All operations are alloc-free, except for converting to System.String.
More...
Inherits INetworkString, INetworkStruct, IEquatable< NetworkString< Size > >, and IEnumerable< char >.
|
int | Compare (NetworkString< Size > s) |
|
int | Compare (ref NetworkString< Size > s) |
|
int | Compare (string s) |
|
int | Compare< OtherSize > (NetworkString< OtherSize > other) |
|
int | Compare< OtherSize > (ref NetworkString< OtherSize > other) |
|
bool | Contains (char c) |
|
bool | Contains (string str) |
|
bool | Contains (uint codePoint) |
|
bool | Contains< OtherSize > (NetworkString< OtherSize > str) |
|
bool | Contains< OtherSize > (ref NetworkString< OtherSize > str) |
|
bool | EndsWith (string s) |
|
bool | EndsWith< OtherSize > (ref NetworkString< OtherSize > other) |
|
bool | Equals (NetworkString< Size > other) |
|
override bool | Equals (object obj) |
|
bool | Equals (ref NetworkString< Size > other) |
|
bool | Equals (string s) |
|
bool | Equals< OtherSize > (NetworkString< OtherSize > other) |
|
bool | Equals< OtherSize > (ref NetworkString< OtherSize > other) |
|
bool | Get (ref string cache) |
| Checks if cache is equivalent and if not converts to UTF16 and stores the result in cache .
|
|
int | GetCharCount () |
| Calculates the length of the equivalent UTF16 string.
|
|
UTF32Tools.CharEnumerator | GetEnumerator () |
|
IEnumerator< char > IEnumerable< char >. | GetEnumerator () |
|
IEnumerator IEnumerable. | GetEnumerator () |
|
override int | GetHashCode () |
|
int | IndexOf (char c, int startIndex, int count) |
|
int | IndexOf (char c, int startIndex=0) |
|
int | IndexOf (string str, int startIndex, int count) |
|
int | IndexOf (string str, int startIndex=0) |
|
int | IndexOf (uint codePoint, int startIndex, int count) |
|
int | IndexOf (uint codePoint, int startIndex=0) |
|
int | IndexOf< OtherSize > (NetworkString< OtherSize > str, int startIndex, int count) |
|
int | IndexOf< OtherSize > (NetworkString< OtherSize > str, int startIndex=0) |
|
int | IndexOf< OtherSize > (ref NetworkString< OtherSize > str, int startIndex, int count) |
|
int | IndexOf< OtherSize > (ref NetworkString< OtherSize > str, int startIndex=0) |
|
bool | Set (string value) |
| Converts value to UTF32 string and stores it internally.
|
|
bool | StartsWith (string s) |
|
bool | StartsWith< OtherSize > (ref NetworkString< OtherSize > other) |
|
NetworkString< Size > | Substring (int startIndex) |
|
NetworkString< Size > | Substring (int startIndex, int length) |
|
NetworkString< Size > | ToLower () |
|
override string | ToString () |
|
NetworkString< Size > | ToUpper () |
|
|
int | Capacity [get] |
| Maximum UTF32 string length.
|
|
int | Length [get] |
| Number of UTF32 scalars. It is equal or less than GetCharCount or the length of Value, because those use UTF16 encoding, which needs two characters to encode some values.
|
|
ref uint | this[int index] [get] |
| Returns UTF32 scalar at index position. To iterate over characters, use GetEnumerator.
|
|
string | Value [get, set] |
| Converts to/from regular UTF16 string. Setter is alloc-free. Use Get(ref string, bool) to get possibly alloc-free conversion.
|
|
Fixed-size UTF32 string. All operations are alloc-free, except for converting to System.String.
- Template Parameters
-
- Type Constraints
-
Size | : | unmanaged | |
Size | : | IFixedStorage | |
◆ Compare< OtherSize >() [1/2]
- Type Constraints
-
OtherSize | : | unmanaged | |
OtherSize | : | IFixedStorage | |
OtherSize | : | Compare | |
OtherSize | : | ref | |
OtherSize | : | other | |
◆ Compare< OtherSize >() [2/2]
- Type Constraints
-
OtherSize | : | unmanaged | |
OtherSize | : | IFixedStorage | |
◆ Contains< OtherSize >() [1/2]
- Type Constraints
-
OtherSize | : | unmanaged | |
OtherSize | : | IFixedStorage | |
OtherSize | : | IndexOf | |
OtherSize | : | ref | |
OtherSize | : | str | |
◆ Contains< OtherSize >() [2/2]
- Type Constraints
-
OtherSize | : | unmanaged | |
OtherSize | : | IFixedStorage | |
OtherSize | : | IndexOf | |
OtherSize | : | ref | |
OtherSize | : | str | |
◆ EndsWith< OtherSize >()
bool EndsWith< OtherSize > |
( |
ref NetworkString< OtherSize > |
other | ) |
|
- Type Constraints
-
OtherSize | : | unmanaged | |
OtherSize | : | IFixedStorage | |
◆ Equals< OtherSize >() [1/2]
- Type Constraints
-
OtherSize | : | unmanaged | |
OtherSize | : | IFixedStorage | |
OtherSize | : | Compare | |
OtherSize | : | ref | |
OtherSize | : | other | |
◆ Equals< OtherSize >() [2/2]
- Type Constraints
-
OtherSize | : | unmanaged | |
OtherSize | : | IFixedStorage | |
OtherSize | : | Compare | |
OtherSize | : | ref | |
OtherSize | : | other | |
◆ Get()
bool Get |
( |
ref string |
cache | ) |
|
Checks if cache is equivalent and if not converts to UTF16 and stores the result in cache .
- Parameters
-
- Returns
- False if no conversion was performed, true otherwise.
◆ GetCapacity< Size >()
static int GetCapacity< Size > |
( |
| ) |
|
|
static |
- Type Constraints
-
Size | : | unmanaged | |
Size | : | IFixedStorage | |
◆ GetCharCount()
Calculates the length of the equivalent UTF16 string.
- Returns
◆ IndexOf< OtherSize >() [1/4]
int IndexOf< OtherSize > |
( |
NetworkString< OtherSize > |
str, |
|
|
int |
startIndex, |
|
|
int |
count |
|
) |
| |
- Type Constraints
-
OtherSize | : | unmanaged | |
OtherSize | : | IFixedStorage | |
OtherSize | : | IndexOf | |
OtherSize | : | ref | |
OtherSize | : | str | |
OtherSize | : | startIndex | |
OtherSize | : | count | |
◆ IndexOf< OtherSize >() [2/4]
int IndexOf< OtherSize > |
( |
NetworkString< OtherSize > |
str, |
|
|
int |
startIndex = 0 |
|
) |
| |
- Type Constraints
-
OtherSize | : | unmanaged | |
OtherSize | : | IFixedStorage | |
OtherSize | : | IndexOf | |
OtherSize | : | ref | |
OtherSize | : | str | |
OtherSize | : | startIndex | |
OtherSize | : | SafeLength | |
OtherSize | : | startIndex | |
◆ IndexOf< OtherSize >() [3/4]
int IndexOf< OtherSize > |
( |
ref NetworkString< OtherSize > |
str, |
|
|
int |
startIndex, |
|
|
int |
count |
|
) |
| |
- Type Constraints
-
OtherSize | : | unmanaged | |
OtherSize | : | IFixedStorage | |
◆ IndexOf< OtherSize >() [4/4]
int IndexOf< OtherSize > |
( |
ref NetworkString< OtherSize > |
str, |
|
|
int |
startIndex = 0 |
|
) |
| |
- Type Constraints
-
OtherSize | : | unmanaged | |
OtherSize | : | IFixedStorage | |
OtherSize | : | IndexOf | |
OtherSize | : | ref | |
OtherSize | : | str | |
OtherSize | : | startIndex | |
OtherSize | : | SafeLength | |
OtherSize | : | startIndex | |
◆ Set()
Converts value to UTF32 string and stores it internally.
- Parameters
-
- Returns
- False if value was too long to fit and had to be trimmed.
◆ StartsWith< OtherSize >()
bool StartsWith< OtherSize > |
( |
ref NetworkString< OtherSize > |
other | ) |
|
- Type Constraints
-
OtherSize | : | unmanaged | |
OtherSize | : | IFixedStorage | |
◆ this[int index]
Returns UTF32 scalar at index position. To iterate over characters, use GetEnumerator.
- Parameters
-
- Returns