Beispiel #1
0
 public function test_finish()
 {
     $this->assertEquals('abbc', Str::finish('ab', 'bc'));
     $this->assertEquals('abbc', wpdevsclub_str_finish('abbcbc', 'bc'));
     $this->assertEquals('abcbbc', Str::finish('abcbbcbc', 'bc'));
 }
Beispiel #2
0
 /**
  * Cap a string with a single instance of a given value.
  *
  * @param  string  $value
  * @param  string  $cap
  * @return string
  */
 function wpdevsclub_str_finish($value, $cap)
 {
     return Str::finish($value, $cap);
 }