str::until($string, $until)

Returns the beginning of a string until the given character

  • $string (string)
  • $until (string)
    Character(s) to end at
  • return (string)
    The beginning of the string

Example

<?php

echo str::until('string', 'r');
// output: str