Note

Tests whether a character is a hex-digit (0-9, a-f, A-F).

Code

///////////////////////////////////////////////////////////////////////////
//  Copyright (C) Wizardry and Steamworks 2014 - License: GNU GPLv3      //
///////////////////////////////////////////////////////////////////////////
integer wasIsXDigit(string a) {
    if(a == "") return FALSE;
    integer x = llBase64ToInteger("AAAA" + 
        llStringToBase64(llGetSubString(a, 0, 0)));
    return (x >= 48 && x <= 57) || (x >= 65 && x <= 70) || 
        (x >= 97 && x <= 102);
}

secondlife/character_handling/isxdigit.txt · Last modified: 2017/02/22 18:20 (external edit)

Access website using Tor


For the copyright, license, warranty and privacy terms for the usage of this website please see the license and privacy pages.