/** * @dataProvider longestCommonPrefixProvider() */ public function testLongestCommonPrefix($expected, $str, $otherStr, $encoding = null) { $result = S::longestCommonPrefix($str, $otherStr, $encoding); $this->assertInternalType('string', $result); $this->assertEquals($expected, $result); }
public function longestCommonPrefix($string, $otherString) { return Stringy::longestCommonPrefix($string, $otherString); }