alphazframework / framework

Core files of AlphaZ Framework
https://alphazframework.github.io/
MIT License
16 stars 17 forks source link

Wrong Behaviours of Str \hasUpperCase and \hasLowerCase #274

Closed lablnet closed 5 years ago

lablnet commented 5 years ago

Consider the following string

#-<ae|9_+0a*a!Q?@(z,3R>.BAb)^%R&*+~RG:$

Upper Case Regx

image

same regx use in LowerCase

peter279k commented 5 years ago

I'm curious about the hasLowercase and hashUppercase method implementations.

Should we consider only about the English string lowercase/uppercase conversion?

If possible, we can change into following regular expression:

hasUppercase:

/([A-Z])/

hasLowercase:

/([a-z])/

image

lablnet commented 5 years ago

I'm curious about the hasLowercase and hashUppercase method implementations.

Should we consider only about the English string lowercase/uppercase conversion?

If possible, we can change into following regular expression:

hasUppercase:

/([A-Z])/

hasLowercase:

/([a-z])/

image

We need to keep in mind encoding as well, in that case UniCode