Idiomatically determine all the lowercase and uppercase letters: Difference between revisions
Idiomatically determine all the lowercase and uppercase letters (view source)
Revision as of 11:51, 24 April 2023
, 1 year agoAdded a precision regarding the possibility to use of Unicode letters and digits in identifiers.
SqrtNegInf (talk | contribs) m (→{{header|Perl}}: look beyond just ASCII) |
(Added a precision regarding the possibility to use of Unicode letters and digits in identifiers.) |
||
Line 946:
Nim has a <code>char</code> type whose values are contained in a single bit. The values from 0 to 127 are the ASCII characters. Strings are composed of char values but they are considered to be encoded in UTF-8. So accessing an individual character of a string may have no meaning when not working in ASCII.
The following program displays the lowercase and uppercase ASCII letters.
<syntaxhighlight lang="nim">import sequtils, strutils
|