171
edits
(→SKSE Global Functions: Added StringUtil.split, present in SKSE since version 1.7.3.) |
(Add the case insensitivity comment found at the top of the script) |
||
| Line 6: | Line 6: | ||
Collection of generic string utility global functions. (These global functions require SKSE) | Collection of generic string utility global functions. (These global functions require SKSE) | ||
A comment found at the top of this script, still present as of SKSE64 version 2.2.6, reads: | |||
<blockquote> | |||
Note about the internal Skyrim implementation of the string classes used for scripting: | |||
The strings are case-insensitive. Each BSFixedString is managed in a cache and reused everywhere it is needed. This means that strings like "O" and "o" are technically equivalent. Which string is used depends greatly on which version is found first. We are investigating how to manage this, but for the time being be aware that the distinction between uppercase and lowercase may not exist. It also means that functions below returning an integer for the character may not correspond exactly. Also GetNthChar("Hello Skyrim!", 4) will return a string with either "O" or "o" depending on which might be registered first. All my tests so far have it return the uppercase, even though in the string it is lowercase. We may solve this problem by switching back to returning an integer rather than a string for GetNthChar, but this will still have problems. | |||
</blockquote> | |||
== Definition == | == Definition == | ||
edits