Function: ctype_lower version 89

Function:
Description: Checks for lowercase character(s).
Version:
Status: latest
Date: 2011-12-20 04:56
Summary: Import from phpjs.
Programmer: jj5
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;
}
[top]

Comments

There are no comments yet, be the first!

Please Login or Register to post comments.