You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I need to be able to compare strings ignoring case. This can be accomplished by introducing a string.compare with direct support for ignore case or by introducing toUpper/toLower (Best to use upper to avoid some situations characters to not match when round tripped to lowercase). Introducing the conversion methods are more general and support a broader range of scenarios, but will be slower than a direct comparison. I know this is a can of worms since it will most likely need to consider culture information. Wren may be able to use culture invariant comparisons, but unsure if that will meet the needs of all users of the language.
The text was updated successfully, but these errors were encountered:
These are based on the ISO-8859-1 character set (i.e. Unicode codepoints < 256) which has the merit of providing almost complete coverage of the major Western European languages. A minor problem is that there is no upper case equivalent of the German letter ẞ and the very rare French letter ÿ within this character set. Although it would be possible to upper case the former as SS unfortunately this would not round-trip.
I think myself this as far as we're likely to go in a simple language such as Wren. It would be much more difficult to extend casing to the full Unicode character set (though I do have methods which produce much greater coverage in my own modules), to provide normalization or to have locale specific versions for the reasons discussed in the PR.
I need to be able to compare strings ignoring case. This can be accomplished by introducing a string.compare with direct support for ignore case or by introducing toUpper/toLower (Best to use upper to avoid some situations characters to not match when round tripped to lowercase). Introducing the conversion methods are more general and support a broader range of scenarios, but will be slower than a direct comparison. I know this is a can of worms since it will most likely need to consider culture information. Wren may be able to use culture invariant comparisons, but unsure if that will meet the needs of all users of the language.
The text was updated successfully, but these errors were encountered: