Warning: Invalid argument supplied for foreach() in /home/jihswbiz/public_html/t6.gwilt.org/refDox.php on line 212
Docs-substr

 

ReLoad

Keys


Functions

arraybrowsercolorcookiedatetimeDBdebugdeviceDSTequiverrorflagsfontformatgeo
holidayhtmlisjsonmathparsePHPprintsearchsortstringtabletexttracetype
VOTDweatherxml

Function  substr   Lines 91-111 (20 lines) file  utilsPHP.php   Last mod: Fri 2021-02-19 13:20:12

function substr $string$offset$length )
        {
#-k     string  PHP
#-      Returns the portion of string specified by the offset and length parameters.
#-      
#-      The offset of the first character position is 0.
#-      If offset is >= 0, the returned string will start at the offset, counting from zero. 
#-      If offset is < 0, count will start from the end of string.
#-      If string is less than offset characters long, false will be returned.
#-e     Example:        $rest = substr("abcdef", -3, 1); // returns "d"
#-
#-      If length is > 0, the string returned will contain at most length characters beginning from offset.
#-      If length is < 0, then that many characters will be omitted from the end of string 
#-              (after the start position has been calculated when a offset is negative). 
#-              If offset denotes the position of this truncation or beyond, false will be returned.
#-e     Example:        $rest = substr("abcdef", 2, -1);  // returns "cde"
#-e     Example:        $rest = substr("abcdef", -3, -1); // returns "de"
#-      If length is = 0, false or null, an empty string will be returned.
#-      If length is omitted, the substring starting from offset until the end of the string will be returned.
        
}
?>
?>