substr() public méthode

The arguments can be any valid expression as long as long as the first argument resolves to a string, and the second and third arguments resolve to integers.
See also: http://docs.mongodb.org/manual/reference/operator/aggregation/substr/
public substr ( mixed | self $string, mixed | self $start, mixed | self $length )
$string mixed | self
$start mixed | self
$length mixed | self
Exemple #1
0
 /**
  * Returns a substring of a string, starting at a specified index position
  * and including the specified number of characters. The index is zero-based.
  *
  * The arguments can be any valid expression as long as long as the first argument resolves to a string, and the second and third arguments resolve to integers.
  *
  * @see http://docs.mongodb.org/manual/reference/operator/aggregation/substr/
  * @see Expr::substr
  * @param mixed|Expr $string
  * @param mixed|Expr $start
  * @param mixed|Expr $length
  * @return self
  */
 public function substr($string, $start, $length)
 {
     $this->expr->substr($string, $start, $length);
     return $this;
 }