本文整理汇总了PHP中Multibyte::strrpos方法的典型用法代码示例。如果您正苦于以下问题:PHP Multibyte::strrpos方法的具体用法?PHP Multibyte::strrpos怎么用?PHP Multibyte::strrpos使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Multibyte
的用法示例。
在下文中一共展示了Multibyte::strrpos方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: testMultibyteStrrpos
/**
* testMultibyteStrrpos method
*
* @return void
*/
public function testMultibyteStrrpos()
{
$string = 'ABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789';
$find = 'F';
$result = Multibyte::strrpos($string, $find);
$expected = 5;
$this->assertEquals($expected, $result);
$string = 'ABCDEFGHIJKLMNOPQFRSTUVWXYZ0123456789';
$find = 'F';
$result = Multibyte::strrpos($string, $find, 6);
$expected = 17;
$this->assertEquals($expected, $result);
$string = 'ÀÁÂÃÄÅÆÇÈÉÊËÌÍÎÏÐÑÒÓÔÕÖØÙÚÛÜÝÞ';
$find = 'Å';
$result = Multibyte::strrpos($string, $find);
$expected = 5;
$this->assertEquals($expected, $result);
$string = 'ÀÁÂÃÄÅÆÇÈÉÊËÌÍÎÏÐÑÒÓÔÕÖØÅÙÚÛÜÝÞ';
$find = 'Å';
$result = Multibyte::strrpos($string, $find, 6);
$expected = 24;
$this->assertEquals($expected, $result);
$string = 'ÀÁÂÃÄÅÆÇÈÉÊËÌÍÎÏÐÑÒÓÔÕÖØÅÙÚÛÜÝÞ';
$find = 'ÙÚ';
$result = Multibyte::strrpos($string, $find);
$expected = 25;
$this->assertEquals($expected, $result);
$string = 'ĀĂĄĆĈĊČĎĐĒĔĖĘĚĜĞĠĢĤĦĨĪĬĮIJĴĶĹĻĽĿŁŃŅŇŊŌŎŐŒŔŖŘŚŜŞŠŢŤŦŨŪŬŮŰŲŴŶŹŻŽ';
$find = 'Ċ';
$result = Multibyte::strrpos($string, $find);
$expected = 5;
$this->assertEquals($expected, $result);
$string = 'ĀĂĄĆĈĊČĎĐĒĔĖĘĚĜĞĠĢĤĦĨĪĬĮIJĴĶĹĻĽĿŁĊŃŅŇŊŌŎŐŒŔŖŘŚŜŞŠŢŤŦŨŪŬŮŰŲŴŶŹŻŽ';
$find = 'Ċ';
$result = Multibyte::strrpos($string, $find, 6);
$expected = 32;
$this->assertEquals($expected, $result);
$string = '!"#$%&\'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\\]^_`abcdefghijklmnopqrstuvwxyz{|}~';
$find = 'F';
$result = Multibyte::strrpos($string, $find);
$expected = 37;
$this->assertEquals($expected, $result);
$string = '¡¢£¤¥¦§¨©ª«¬®¯°±²³´µ¶·¸¹º»¼½¾¿ÀÁÂÃÄÅÆÇÈ';
$find = 'µ';
$result = Multibyte::strrpos($string, $find);
$expected = 20;
$this->assertEquals($expected, $result);
$string = 'ÉÊËÌÍÎÏÐÑÒÓÔÕÖ×ØÙÚÛÜÝÞßàáâãäåæçèéêëìíîïðñòóôõö÷øùúûüýþÿĀāĂ㥹ĆćĈĉĊċČčĎďĐđĒēĔĕĖėĘęĚěĜĝĞğĠġĢģĤĥĦħĨĩĪīĬ';
$find = 'é';
$result = Multibyte::strrpos($string, $find);
$expected = 32;
$this->assertEquals($expected, $result);
$string = 'ĭĮįİıIJijĴĵĶķĸĹĺĻļĽľĿŀŁłŃńŅņŇňʼnŊŋŌōŎŏŐőŒœŔŕŖŗŘřŚśŜŝŞşŠšŢţŤťŦŧŨũŪūŬŭŮůŰűŲųŴŵŶŷŸŹźŻżŽžſƀƁƂƃƄƅƆƇƈƉƊƋƌƍƎƏƐ';
$find = 'Ņ';
$result = Multibyte::strrpos($string, $find);
$expected = 24;
$this->assertEquals($expected, $result);
$string = 'ƑƒƓƔƕƖƗƘƙƚƛƜƝƞƟƠơƢƣƤƥƦƧƨƩƪƫƬƭƮƯưƱƲƳƴƵƶƷƸƹƺƻƼƽƾƿǀǁǂǃDŽDždžLJLjljNJNjnjǍǎǏǐǑǒǓǔǕǖǗǘǙǚǛǜǝǞǟǠǡǢǣǤǥǦǧǨǩǪǫǬǭǮǯǰDZDzdzǴ';
$find = 'Ƹ';
$result = Multibyte::strrpos($string, $find);
$expected = 39;
$this->assertEquals($expected, $result);
$string = 'ƑƒƓƔƕƖƗƘƙƚƛƜƝƞƟƠơƢƣƤƥƦƧƨƩƪƫƬƭƮƯưƱƲƳƴƵƶƷƸƹƺƻƼƽƾƿǀǁǂǃDŽDždžLJLjljNJNjnjǍǎǏǐǑǒǓǔǕǖǗǘǙǚǛǜǝǞǟǠǡǢǣǤǥǦǧǨǩǪǫǬǭǮǯǰDZDzdzǴ';
$find = 'ƹ';
$result = Multibyte::strrpos($string, $find);
$expected = 40;
$this->assertEquals($expected, $result);
$string = 'əɚɛɜɝɞɟɠɡɢɣɤɥɦɧɨɩɪɫɬɭɮɯɰɱɲɳɴɵɶɷɸɹɺɻɼɽɾɿʀʁʂʃʄʅʆʇʈʉʊʋʌʍʎʏʐʑʒʓʔʕʖʗʘʙʚʛʜʝʞʟʠʡʢʣʤʥʦʧʨʩʪʫʬʭʮʯʰʱʲʳʴʵʶʷʸʹʺʻʼ';
$find = 'ʀ';
$result = Multibyte::strrpos($string, $find);
$expected = 39;
$this->assertEquals($expected, $result);
$string = 'ЀЁЂЃЄЅІЇЈЉЊЋЌЍЎЏАБВГДЕЖЗИЙКЛ';
$find = 'Ї';
$result = Multibyte::strrpos($string, $find);
$expected = 7;
$this->assertEquals($expected, $result);
$string = 'МНОПРСТУФХЦЧШЩЪЫЬЭЮЯабвгдежзийклмнопрстуфхцчшщъыь';
$find = 'Р';
$result = Multibyte::strrpos($string, $find);
$expected = 4;
$this->assertEquals($expected, $result);
$string = 'МНОПРСТУФХЦЧШЩЪЫЬЭЮЯабвгдежзийклмнопрстуфхцчшщъыь';
$find = 'р';
$result = Multibyte::strrpos($string, $find, 5);
$expected = 36;
$this->assertEquals($expected, $result);
$string = 'فقكلمنهوىيًٌٍَُ';
$find = 'ن';
$result = Multibyte::strrpos($string, $find);
$expected = 5;
$this->assertEquals($expected, $result);
$string = '✰✱✲✳✴✵✶✷✸✹✺✻✼✽✾✿❀❁❂❃❄❅❆❇❈❉❊❋❌❍❎❏❐❑❒❓❔❕❖❗❘❙❚❛❜❝❞';
$find = '✿';
$result = Multibyte::strrpos($string, $find);
//.........这里部分代码省略.........
示例2: mb_strrpos
function mb_strrpos($haystack, $needle, $offset = 0, $encoding = null)
{
return Multibyte::strrpos($haystack, $needle, $offset);
}