clarify and tidy and funny warning |
m link microsoft documentation |
||
Line 20: | Line 20: | ||
The string to retrieve the character or surrogate pair from. | The string to retrieve the character or surrogate pair from. | ||
=== Index ([[Type: | === Index ([[Type:int|int]]) === | ||
The 0-indexed character to retrieve from <code>String</code>. | The 0-indexed character to retrieve from <code>String</code>. | ||
Line 32: | Line 32: | ||
The value <code>0</code> is returned instead if one of the following is true: | The value <code>0</code> is returned instead if one of the following is true: | ||
* <code>Index</code> is greater than or equal to the [[ProtoFlux:String Length|String Length]]. | * <code>Index</code> is greater than or equal to the [[ProtoFlux:String Length|String Length]]. | ||
* <code>Index</code> points to a [https://en.wikipedia.org/wiki/Surrogate_code_points#Surrogates low surrogate]. | * <code>Index</code> points to a [https://en.wikipedia.org/wiki/Surrogate_code_points#Surrogates low surrogate]. | ||
* <code>Index</code> points to a high surrogate without a low surrogate following it. | * <code>Index</code> points to a high surrogate without a low surrogate following it. | ||
== See Also == | |||
* [https://learn.microsoft.com/en-us/dotnet/api/system.char.converttoutf32#system-char-converttoutf32(system-string-system-int32) Microsoft documentation for the <code>Char.ConvertToUtf32(String, Int32)</code> method]. | |||
[[Category:ProtoFlux:Strings:Characters]] | [[Category:ProtoFlux:Strings:Characters]] |
Revision as of 22:51, 28 April 2024
String To UTF32
Characters
String To UTF32
returns the code point (UTF-32 value) of a character or surrogate pair in a string.
Inputs
String (String)
The string to retrieve the character or surrogate pair from.
Index (int)
The 0-indexed character to retrieve from String
.
Outputs
* (int)
The code point of the character or surrogate pair at the index in the string.
The value 0
is returned instead if one of the following is true:
Index
is greater than or equal to the String Length.Index
points to a low surrogate.Index
points to a high surrogate without a low surrogate following it.