View: ctype_lower

Function:
Description: Checks for lowercase character(s).
Code
1
2
3
4
5
6
7
8
9
10
11
12
13
14
function ctype_lower (text) {
    // http://jsphp.co/jsphp/fn/view/ctype_lower
    // +   original by: Brett Zamir (http://brett-zamir.me)
    // -    depends on: setlocale
    // *     example 1: ctype_lower('abc');
    // *     returns 1: true
    if (typeof text !== 'string') {
        return false;
    }
    // BEGIN REDUNDANT
    this.setlocale('LC_ALL', 0); // ensure setup of localization variables takes place
    // END REDUNDANT
    return text.search(this.php_js.locales[this.php_js.localeCategories.LC_CTYPE].LC_CTYPE.lw) !== -1;
}
Comment on ctype_lower version 89
Tests
Benchmark
[top]

Comments

There are no comments yet, be the first!

Please Login or Register to post comments.