jerryscript icon indicating copy to clipboard operation
jerryscript copied to clipboard

Implement toLowerCase and toUpperCase

Open zherczeg opened this issue 11 years ago • 6 comments

String manipulation functions and regular expressions require lowercase/uppercase conversion. See

http://www.ecma-international.org/ecma-262/5.1/#sec-15.5.4.16

To implement them, we need some utilities in the core.

  1. We need a variant, which converts a character to its uppercase described in (starting from Canonicalize part) http://www.ecma-international.org/ecma-262/5.1/#sec-15.10.2.8

  2. We also need variants, which converts characters to 1 or more upper/lowercase characters. E.g. the uppercase form of german sharp s is SS. This is needed for String.prototype.toUpperCase String.prototype.toLowerCase.

  3. Fortunately LocaleCompare is platform dependent.

Could you raise the priority of implementing these functions in the core?

zherczeg avatar Jul 07 '15 12:07 zherczeg

@zherczeg, these functions are not in our nearest aims, as we are concentrating on fixing test262 and improving the parser. We could implement them in three weeks. Maybe you can implement them roughly for now, supporting ASCII only for example, and we'll fix them later?

sand1k avatar Jul 08 '15 12:07 sand1k

Ok, I will sketch the appropriate functions and you can implement them later.

zherczeg avatar Jul 08 '15 12:07 zherczeg

@zherczeg, thank you.

sand1k avatar Jul 08 '15 12:07 sand1k

@zherczeg, is this still valid?

LaszloLango avatar Jul 14 '16 11:07 LaszloLango

Thanks for reminding me to this. This is very much valid.

zherczeg avatar Jul 14 '16 12:07 zherczeg

#1575

robertsipka avatar Feb 10 '17 09:02 robertsipka