Note

Tests whether a character is white space. Note that this function includes the following escape characters:

Character Description
Space
\n Newline
\t Horizontal tab
\v Vertical tab
\f Form feed
\r Carriage return

Note that the \v, \f and \r characters are not recognised by LSL but this function handles them.

Code

///////////////////////////////////////////////////////////////////////////
//  Copyright (C) Wizardry and Steamworks 2014 - License: GNU GPLv3      //
///////////////////////////////////////////////////////////////////////////
integer wasIsSpace(string a) {
    if(a == "") return FALSE;
    integer x = llBase64ToInteger("AAAA" + 
        llStringToBase64(llGetSubString(a, 0, 0)));
    return x == 32 || x == 10 || x == 9 || x == 11 || x == 12 || x == 13;
}

secondlife/character_handling/isspace.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.