Skip to content

isupper does not work how it works in python #45

@jjpepper

Description

@jjpepper

isupper doesn't behave like python isupper. In python isupper on a string that has only upper and non-alphabetic characters returns True. Note your doco indicates that it should behave this way, as you say

this has caused quite some pain

>>> 'abc'.isupper()
False
>>> 'ABC'.isupper()
True
>>> 'ABc'.isupper()
False
>>> 'AB-C'.isupper()
True
>>> 
    //////////////////////////////////////////////////////////////////////////////////////////////
    /// @brief Return true if all cased characters in the string are uppercase and there is at least one
    /// cased character, false otherwise.
    ///
    bool isupper( const std::string & str );

- is not a cased character.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions