bundles / numpy 2.4.3 / numpy / _core / _string_helpers / english_upper
function
numpy._core._string_helpers:english_upper
Signature
def english_upper ( s ) Summary
Apply English case rules to convert ASCII strings to all upper case.
Extended Summary
This is an internal utility function to replace calls to str.upper() such that we can avoid changing behavior with changing locales. In particular, Turkish has distinct dotted and dotless variants of the Latin letter "I" in both lowercase and uppercase. Thus, "i".upper() != "I" in a "tr" locale.
Parameters
s: str
Returns
uppered: str
Examples
from numpy._core.numerictypes import english_upper english_upper('ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789_') english_upper('')
Aliases
-
numpy._core._string_helpers.english_upper