예제 #1
0
 /**
  * Returns a substring from a string.
  *
  * As a special case, the method returns an empty string if the starting position is equal to the string's length
  * or if the substring's length, if specified, is `0`.
  *
  * @param  int $startPos The position of the substring's first character.
  * @param  int $length **OPTIONAL. Default is** *as many characters as the starting character is followed by*. The
  * length of the substring.
  *
  * @return CUStringObject The substring.
  */
 public function substr($startPos, $length = null)
 {
     return CUString::substr($this, $startPos, $length);
 }