Files
Nim/lib/pure
Kaushal Modi 24df909d8a Make isUpper (and variants) work for strings with non-alpha chars
The other variants are isLower, isUpperAscii and isLowerAscii

Fixes https://github.com/nim-lang/Nim/issues/7963.

This commit changes the behavior and signatures of:

- isUpper, isLower in the unicode module
- isUpperAscii, isLowerAscii in the strutils module

A second mandatory parameter skipNonAlpha is added to these 4 procs.

(This change affects only for the case where the input is a *string*.)

---

With skipNonAlpha set to true, the behavior mimics the Python isupper and
islower behavior i.e. non-alphabetic chars/runes are ignored when checking if
the string is upper-case or lower-case.

    Before this commit:

      doAssert(not isUpper("A B"))

    After this commit:

      doAssert(not isUpper("A B", false))    <-- old behavior
      doAssert isUpper("A B", true)

      Below two are equivalent:

                           isUpper("A B", true)

        isAlpha("A B") and isUpper("A B", false)

.. and the similar for other 3 procs.
2018-06-08 15:14:29 -04:00
..
2018-05-14 11:40:59 +02:00
2018-05-29 07:28:15 +03:00
2018-04-30 02:52:58 +02:00
2018-06-01 11:20:28 -04:00
2018-04-30 02:52:58 +02:00
2017-03-02 14:53:50 +01:00
2015-10-01 12:05:45 -07:00
2018-04-15 23:38:43 +02:00
2017-07-07 08:10:39 +02:00
2018-04-25 02:41:16 +02:00
2018-04-06 11:59:49 +02:00
2018-04-30 02:52:58 +02:00
2018-06-05 11:15:04 -04:00
2018-05-06 10:55:19 +02:00
2016-07-21 08:53:10 +01:00
2018-05-23 10:23:19 +03:00
2016-07-21 08:52:39 +01:00
2017-03-26 09:30:59 +02:00
2015-02-03 09:04:24 +01:00
2018-06-05 00:09:07 -04:00
2018-05-30 23:49:56 +03:00
2018-04-13 17:45:58 +02:00
2017-01-25 20:02:19 +01:00
2018-05-23 16:28:53 +02:00