IsLowercase method using string::find_first_not_of

Good day!
I’ve tried to find a way to check all the special characters not only spaces or \0 case and found two solutions on StackOverflow. The one is to use string::find_first_not_of and type all the letters I want allow to pass through my function. It doesn’t look neat, but it works.

https://gist.github.com/BercutSh/9ea0bb58c644e322f40006cf17f85749

The second way is using the regular expression pattern like [a-z].
So what do you think about advantages and disadvantages of these methods?

UPD: Just realized that islower() has the same effect and doesn’t allow to use special characters :slight_smile:

Hello! I came to the same solution and wanted to brag about it, but it seems you have beat me to it :slight_smile:


But it looks like your method is more efficient than mine.
I too would like to know if there are some disadvantages to using this method.