Type:String: Difference between revisions
More actions
that paragraph was too long. make it more concise. also strings as arrays |
m fix sentence |
||
| (One intermediate revision by one other user not shown) | |||
| Line 5: | Line 5: | ||
Strings are sequences of [[Type:char|chars]], and as such are [https://en.wikipedia.org/wiki/UTF-16 UTF-16] encoded. When representing characters that are outside the [https://en.wikipedia.org/wiki/Plane_(Unicode)#Basic_Multilingual_Plane Basic Multilingual Plane], a pair of two <code>char</code>s is used, known as a [https://en.wikipedia.org/wiki/Surrogate_pair#U+D800_to_U+DFFF_(surrogates) surrogate pair]. Due to this, not every character in a string may be mapped directly to one <code>char</code>, and this can cause confusion when using ProtoFlux nodes on strings containing non-BMP characters. Additionally, stray surrogate characters that are not part of a surrogate pair may not behave as intended. | Strings are sequences of [[Type:char|chars]], and as such are [https://en.wikipedia.org/wiki/UTF-16 UTF-16] encoded. When representing characters that are outside the [https://en.wikipedia.org/wiki/Plane_(Unicode)#Basic_Multilingual_Plane Basic Multilingual Plane], a pair of two <code>char</code>s is used, known as a [https://en.wikipedia.org/wiki/Surrogate_pair#U+D800_to_U+DFFF_(surrogates) surrogate pair]. Due to this, not every character in a string may be mapped directly to one <code>char</code>, and this can cause confusion when using ProtoFlux nodes on strings containing non-BMP characters. Additionally, stray surrogate characters that are not part of a surrogate pair may not behave as intended. | ||
Strings may be used a primitive form of 16-bit [[Type:Int|integer]] arrays in [[ProtoFlux]] by way of the [[ProtoFlux:Get Character|Get Character]] node and [[ProtoFlux:To UTF16|To UTF16]] node. | Strings may be used as a primitive form of 16-bit [[Type:Int|integer]] arrays in [[ProtoFlux]] by way of the [[ProtoFlux:Get Character|Get Character]] node and [[ProtoFlux:To UTF16|To UTF16]] node. | ||
== See Also == | == See Also == | ||
| Line 14: | Line 14: | ||
[[Category:Type]] | [[Category:Type]] | ||
[[Category:Value | [[Category:Value types]] | ||
Latest revision as of 12:01, 27 January 2026
The string type is a direct interface to the string type in C#.
Strings are considered a value type in the FrooxEngine data model, but an object in the ProtoFlux data model.
Strings are sequences of chars, and as such are UTF-16 encoded. When representing characters that are outside the Basic Multilingual Plane, a pair of two chars is used, known as a surrogate pair. Due to this, not every character in a string may be mapped directly to one char, and this can cause confusion when using ProtoFlux nodes on strings containing non-BMP characters. Additionally, stray surrogate characters that are not part of a surrogate pair may not behave as intended.
Strings may be used as a primitive form of 16-bit integer arrays in ProtoFlux by way of the Get Character node and To UTF16 node.