wi32lib: RFC for w32string()
- Posted by CChris <christian.cuvier at agric?lture.gouv.f?> May 16, 2008
- 688 views
Defined in w32utils.e, w32string() is an user defined type which validates sequence of integers in the 0 to 255 range. So, for instance, w32string({5,0,255,7}) is 1, but try naming anything this way, or printing it. Good luck. This is why I suggest changing its meaning slightly to something probably more useful: 1/ create a new String_CT w32CType() class, initially identical to Printable_CT. 2/ change w32string() to validate a sequence of characters in the String_CT class. This would reject the garbage above, and enable anyone to add accented or double byte (UTF-16) characters to the range of what w32strung() accepts. A simpler variant would be to directly tie w32string() to Printable_CT. I don't know about all uses of this char class by Eu code, so uncoupling the two issues is 100% safe, at the cost of a new char class. Any thoughts? CChris