예제 #1
0
파일: bom.php 프로젝트: protaskin/utf8
/**
 * Removes a BOM from a string.
 *
 * @param  string $str The UTF-8 encoded string
 * @return string The string without a BOM
 */
function utf8_remove_bom($str)
{
    return utf8_check_bom($str) ? substr($str, 3) : $str;
}
예제 #2
0
파일: Bom.php 프로젝트: protaskin/utf8
 /**
  * @dataProvider providerUtf8CheckBom
  */
 public function testUtf8CheckBom($str, $rv)
 {
     $this->assertEquals(utf8_check_bom($str), $rv);
 }