1 |
$partstring = substr($string,$start,$length); # returns in $partstring the partial string starting at position $start (=0 for first character in $string) and of at most $length characters
|
2 |
substr($string,$start,$length)= $new; # replaces extracted substring with characters in $new which need not be of same length as original
|