Should you be able to initialize a float with a char?
Walter Bright
newshound2 at digitalmars.com
Thu May 19 18:35:42 UTC 2022
On 5/19/2022 1:05 AM, bauss wrote:
> On Thursday, 19 May 2022 at 04:10:04 UTC, Walter Bright wrote:
>>
>> There's nothing wrong with:
>>
>> if ('A' <= c && c <= 'Z')
>> c = c | 0x20;
>>
>
> There is, this assumes that the character is ascii and not unicode.
It does not assume it, it tests for if it would be valid.
> What about say 'Å' -> 'å'?
>
> It won't work for that.
I know. And for many applications (like dev tools), it is fine.
More information about the Digitalmars-d
mailing list