pictcode / lib / Cake / Test / Case / I18n / MultibyteTest.php @ 635eef61
履歴 | 表示 | アノテート | ダウンロード (380.605 KB)
1 | 635eef61 | spyder1211 | <?php
|
---|---|---|---|
2 | /**
|
||
3 | * MultibyteTest file
|
||
4 | *
|
||
5 | * CakePHP(tm) Tests <http://book.cakephp.org/2.0/en/development/testing.html>
|
||
6 | * Copyright (c) Cake Software Foundation, Inc. (http://cakefoundation.org)
|
||
7 | *
|
||
8 | * Licensed under The MIT License
|
||
9 | * For full copyright and license information, please see the LICENSE.txt
|
||
10 | * Redistributions of files must retain the above copyright notice
|
||
11 | *
|
||
12 | * @copyright Copyright (c) Cake Software Foundation, Inc. (http://cakefoundation.org)
|
||
13 | * @link http://book.cakephp.org/2.0/en/development/testing.html CakePHP(tm) Tests
|
||
14 | * @package Cake.Test.Case.I18n
|
||
15 | * @since CakePHP(tm) v 1.2.0.6833
|
||
16 | * @license http://www.opensource.org/licenses/mit-license.php MIT License
|
||
17 | */
|
||
18 | |||
19 | App::uses('Multibyte', 'I18n'); |
||
20 | |||
21 | /**
|
||
22 | * MultibyteTest class
|
||
23 | *
|
||
24 | * @package Cake.Test.Case.I18n
|
||
25 | */
|
||
26 | class MultibyteTest extends CakeTestCase { |
||
27 | |||
28 | /**
|
||
29 | * testUtf8 method
|
||
30 | *
|
||
31 | * @return void
|
||
32 | */
|
||
33 | public function testUtf8() { |
||
34 | $string = '!"#$%&\'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~'; |
||
35 | $result = Multibyte::utf8($string); |
||
36 | $expected = array(33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, |
||
37 | 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, |
||
38 | 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, |
||
39 | 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126); |
||
40 | $this->assertEquals($expected, $result); |
||
41 | |||
42 | $string = '¡¢£¤¥¦§¨©ª«¬®¯°±²³´µ¶·¸¹º»¼½¾¿ÀÁÂÃÄÅÆÇÈ'; |
||
43 | $result = Multibyte::utf8($string); |
||
44 | $expected = array(161, 162, 163, 164, 165, 166, 167, 168, 169, 170, 171, 172, 173, 174, 175, 176, 177, 178, 179, 180, 181, |
||
45 | 182, 183, 184, 185, 186, 187, 188, 189, 190, 191, 192, 193, 194, 195, 196, 197, 198, 199, 200); |
||
46 | $this->assertEquals($expected, $result); |
||
47 | |||
48 | $string = 'ÉÊËÌÍÎÏÐÑÒÓÔÕÖ×ØÙÚÛÜÝÞßàáâãäåæçèéêëìíîïðñòóôõö÷øùúûüýþÿĀāĂ㥹ĆćĈĉĊċČčĎďĐđĒēĔĕĖėĘęĚěĜĝĞğĠġĢģĤĥĦħĨĩĪīĬ'; |
||
49 | $result = Multibyte::utf8($string); |
||
50 | $expected = array(201, 202, 203, 204, 205, 206, 207, 208, 209, 210, 211, 212, 213, 214, 215, 216, 217, 218, 219, 220, 221, |
||
51 | 222, 223, 224, 225, 226, 227, 228, 229, 230, 231, 232, 233, 234, 235, 236, 237, 238, 239, 240, 241, 242, |
||
52 | 243, 244, 245, 246, 247, 248, 249, 250, 251, 252, 253, 254, 255, 256, 257, 258, 259, 260, 261, 262, 263, |
||
53 | 264, 265, 266, 267, 268, 269, 270, 271, 272, 273, 274, 275, 276, 277, 278, 279, 280, 281, 282, 283, 284, |
||
54 | 285, 286, 287, 288, 289, 290, 291, 292, 293, 294, 295, 296, 297, 298, 299, 300); |
||
55 | $this->assertEquals($expected, $result); |
||
56 | |||
57 | $string = 'ĭĮįİıIJijĴĵĶķĸĹĺĻļĽľĿŀŁłŃńŅņŇňʼnŊŋŌōŎŏŐőŒœŔŕŖŗŘřŚśŜŝŞşŠšŢţŤťŦŧŨũŪūŬŭŮůŰűŲųŴŵŶŷŸŹźŻżŽžſƀƁƂƃƄƅƆƇƈƉƊƋƌƍƎƏƐ'; |
||
58 | $result = Multibyte::utf8($string); |
||
59 | $expected = array(301, 302, 303, 304, 305, 306, 307, 308, 309, 310, 311, 312, 313, 314, 315, 316, 317, 318, 319, 320, 321, |
||
60 | 322, 323, 324, 325, 326, 327, 328, 329, 330, 331, 332, 333, 334, 335, 336, 337, 338, 339, 340, 341, 342, |
||
61 | 343, 344, 345, 346, 347, 348, 349, 350, 351, 352, 353, 354, 355, 356, 357, 358, 359, 360, 361, 362, 363, |
||
62 | 364, 365, 366, 367, 368, 369, 370, 371, 372, 373, 374, 375, 376, 377, 378, 379, 380, 381, 382, 383, 384, |
||
63 | 385, 386, 387, 388, 389, 390, 391, 392, 393, 394, 395, 396, 397, 398, 399, 400); |
||
64 | $this->assertEquals($expected, $result); |
||
65 | |||
66 | $string = 'ƑƒƓƔƕƖƗƘƙƚƛƜƝƞƟƠơƢƣƤƥƦƧƨƩƪƫƬƭƮƯưƱƲƳƴƵƶƷƸƹƺƻƼƽƾƿǀǁǂǃDŽDždžLJLjljNJNjnjǍǎǏǐǑǒǓǔǕǖǗǘǙǚǛǜǝǞǟǠǡǢǣǤǥǦǧǨǩǪǫǬǭǮǯǰDZDzdzǴ'; |
||
67 | $result = Multibyte::utf8($string); |
||
68 | $expected = array(401, 402, 403, 404, 405, 406, 407, 408, 409, 410, 411, 412, 413, 414, 415, 416, 417, 418, 419, 420, 421, |
||
69 | 422, 423, 424, 425, 426, 427, 428, 429, 430, 431, 432, 433, 434, 435, 436, 437, 438, 439, 440, 441, 442, |
||
70 | 443, 444, 445, 446, 447, 448, 449, 450, 451, 452, 453, 454, 455, 456, 457, 458, 459, 460, 461, 462, 463, |
||
71 | 464, 465, 466, 467, 468, 469, 470, 471, 472, 473, 474, 475, 476, 477, 478, 479, 480, 481, 482, 483, 484, |
||
72 | 485, 486, 487, 488, 489, 490, 491, 492, 493, 494, 495, 496, 497, 498, 499, 500); |
||
73 | $this->assertEquals($expected, $result); |
||
74 | |||
75 | $string = 'əɚɛɜɝɞɟɠɡɢɣɤɥɦɧɨɩɪɫɬɭɮɯɰɱɲɳɴɵɶɷɸɹɺɻɼɽɾɿʀʁʂʃʄʅʆʇʈʉʊʋʌʍʎʏʐʑʒʓʔʕʖʗʘʙʚʛʜʝʞʟʠʡʢʣʤʥʦʧʨʩʪʫʬʭʮʯʰʱʲʳʴʵʶʷʸʹʺʻʼ'; |
||
76 | $result = Multibyte::utf8($string); |
||
77 | $expected = array(601, 602, 603, 604, 605, 606, 607, 608, 609, 610, 611, 612, 613, 614, 615, 616, 617, 618, 619, 620, 621, |
||
78 | 622, 623, 624, 625, 626, 627, 628, 629, 630, 631, 632, 633, 634, 635, 636, 637, 638, 639, 640, 641, 642, |
||
79 | 643, 644, 645, 646, 647, 648, 649, 650, 651, 652, 653, 654, 655, 656, 657, 658, 659, 660, 661, 662, 663, |
||
80 | 664, 665, 666, 667, 668, 669, 670, 671, 672, 673, 674, 675, 676, 677, 678, 679, 680, 681, 682, 683, 684, |
||
81 | 685, 686, 687, 688, 689, 690, 691, 692, 693, 694, 695, 696, 697, 698, 699, 700); |
||
82 | $this->assertEquals($expected, $result); |
||
83 | |||
84 | $string = 'ЀЁЂЃЄЅІЇЈЉЊЋЌЍЎЏАБВГДЕЖЗИЙКЛ'; |
||
85 | $result = Multibyte::utf8($string); |
||
86 | $expected = array(1024, 1025, 1026, 1027, 1028, 1029, 1030, 1031, 1032, 1033, 1034, 1035, 1036, 1037, 1038, 1039, 1040, 1041, |
||
87 | 1042, 1043, 1044, 1045, 1046, 1047, 1048, 1049, 1050, 1051); |
||
88 | $this->assertEquals($expected, $result); |
||
89 | |||
90 | $string = 'МНОПРСТУФХЦЧШЩЪЫЬЭЮЯабвгдежзийклмнопрстуфхцчшщъыь'; |
||
91 | $result = Multibyte::utf8($string); |
||
92 | $expected = array(1052, 1053, 1054, 1055, 1056, 1057, 1058, 1059, 1060, 1061, 1062, 1063, 1064, 1065, 1066, 1067, 1068, 1069, |
||
93 | 1070, 1071, 1072, 1073, 1074, 1075, 1076, 1077, 1078, 1079, 1080, 1081, 1082, 1083, 1084, 1085, 1086, 1087, |
||
94 | 1088, 1089, 1090, 1091, 1092, 1093, 1094, 1095, 1096, 1097, 1098, 1099, 1100); |
||
95 | $this->assertEquals($expected, $result); |
||
96 | |||
97 | $string = 'չպջռսվտ'; |
||
98 | $result = Multibyte::utf8($string); |
||
99 | $expected = array(1401, 1402, 1403, 1404, 1405, 1406, 1407); |
||
100 | $this->assertEquals($expected, $result); |
||
101 | |||
102 | $string = 'فقكلمنهوىيًٌٍَُ'; |
||
103 | $result = Multibyte::utf8($string); |
||
104 | $expected = array(1601, 1602, 1603, 1604, 1605, 1606, 1607, 1608, 1609, 1610, 1611, 1612, 1613, 1614, 1615); |
||
105 | $this->assertEquals($expected, $result); |
||
106 | |||
107 | $string = '✰✱✲✳✴✵✶✷✸✹✺✻✼✽✾✿❀❁❂❃❄❅❆❇❈❉❊❋❌❍❎❏❐❑❒❓❔❕❖❗❘❙❚❛❜❝❞'; |
||
108 | $result = Multibyte::utf8($string); |
||
109 | $expected = array(10032, 10033, 10034, 10035, 10036, 10037, 10038, 10039, 10040, 10041, 10042, 10043, 10044, |
||
110 | 10045, 10046, 10047, 10048, 10049, 10050, 10051, 10052, 10053, 10054, 10055, 10056, 10057, |
||
111 | 10058, 10059, 10060, 10061, 10062, 10063, 10064, 10065, 10066, 10067, 10068, 10069, 10070, |
||
112 | 10071, 10072, 10073, 10074, 10075, 10076, 10077, 10078); |
||
113 | $this->assertEquals($expected, $result); |
||
114 | |||
115 | $string = '⺀⺁⺂⺃⺄⺅⺆⺇⺈⺉⺊⺋⺌⺍⺎⺏⺐⺑⺒⺓⺔⺕⺖⺗⺘⺙⺛⺜⺝⺞⺟⺠⺡⺢⺣⺤⺥⺦⺧⺨⺩⺪⺫⺬⺭⺮⺯⺰⺱⺲⺳⺴⺵⺶⺷⺸⺹⺺⺻⺼⺽⺾⺿⻀⻁⻂⻃⻄⻅⻆⻇⻈⻉⻊⻋⻌⻍⻎⻏⻐⻑⻒⻓⻔⻕⻖⻗⻘⻙⻚⻛⻜⻝⻞⻟⻠'; |
||
116 | $result = Multibyte::utf8($string); |
||
117 | $expected = array(11904, 11905, 11906, 11907, 11908, 11909, 11910, 11911, 11912, 11913, 11914, 11915, 11916, 11917, 11918, 11919, |
||
118 | 11920, 11921, 11922, 11923, 11924, 11925, 11926, 11927, 11928, 11929, 11931, 11932, 11933, 11934, 11935, 11936, |
||
119 | 11937, 11938, 11939, 11940, 11941, 11942, 11943, 11944, 11945, 11946, 11947, 11948, 11949, 11950, 11951, 11952, |
||
120 | 11953, 11954, 11955, 11956, 11957, 11958, 11959, 11960, 11961, 11962, 11963, 11964, 11965, 11966, 11967, 11968, |
||
121 | 11969, 11970, 11971, 11972, 11973, 11974, 11975, 11976, 11977, 11978, 11979, 11980, 11981, 11982, 11983, 11984, |
||
122 | 11985, 11986, 11987, 11988, 11989, 11990, 11991, 11992, 11993, 11994, 11995, 11996, 11997, 11998, 11999, 12000); |
||
123 | $this->assertEquals($expected, $result); |
||
124 | |||
125 | $string = '⽅⽆⽇⽈⽉⽊⽋⽌⽍⽎⽏⽐⽑⽒⽓⽔⽕⽖⽗⽘⽙⽚⽛⽜⽝⽞⽟⽠⽡⽢⽣⽤⽥⽦⽧⽨⽩⽪⽫⽬⽭⽮⽯⽰⽱⽲⽳⽴⽵⽶⽷⽸⽹⽺⽻⽼⽽⽾⽿'; |
||
126 | $result = Multibyte::utf8($string); |
||
127 | $expected = array(12101, 12102, 12103, 12104, 12105, 12106, 12107, 12108, 12109, 12110, 12111, 12112, 12113, 12114, 12115, 12116, |
||
128 | 12117, 12118, 12119, 12120, 12121, 12122, 12123, 12124, 12125, 12126, 12127, 12128, 12129, 12130, 12131, 12132, |
||
129 | 12133, 12134, 12135, 12136, 12137, 12138, 12139, 12140, 12141, 12142, 12143, 12144, 12145, 12146, 12147, 12148, |
||
130 | 12149, 12150, 12151, 12152, 12153, 12154, 12155, 12156, 12157, 12158, 12159); |
||
131 | $this->assertEquals($expected, $result); |
||
132 | |||
133 | $string = '눡눢눣눤눥눦눧눨눩눪눫눬눭눮눯눰눱눲눳눴눵눶눷눸눹눺눻눼눽눾눿뉀뉁뉂뉃뉄뉅뉆뉇뉈뉉뉊뉋뉌뉍뉎뉏뉐뉑뉒뉓뉔뉕뉖뉗뉘뉙뉚뉛뉜뉝뉞뉟뉠뉡뉢뉣뉤뉥뉦뉧뉨뉩뉪뉫뉬뉭뉮뉯뉰뉱뉲뉳뉴뉵뉶뉷뉸뉹뉺뉻뉼뉽뉾뉿늀늁늂늃늄'; |
||
134 | $result = Multibyte::utf8($string); |
||
135 | $expected = array(45601, 45602, 45603, 45604, 45605, 45606, 45607, 45608, 45609, 45610, 45611, 45612, 45613, 45614, 45615, 45616, |
||
136 | 45617, 45618, 45619, 45620, 45621, 45622, 45623, 45624, 45625, 45626, 45627, 45628, 45629, 45630, 45631, 45632, |
||
137 | 45633, 45634, 45635, 45636, 45637, 45638, 45639, 45640, 45641, 45642, 45643, 45644, 45645, 45646, 45647, 45648, |
||
138 | 45649, 45650, 45651, 45652, 45653, 45654, 45655, 45656, 45657, 45658, 45659, 45660, 45661, 45662, 45663, 45664, |
||
139 | 45665, 45666, 45667, 45668, 45669, 45670, 45671, 45672, 45673, 45674, 45675, 45676, 45677, 45678, 45679, 45680, |
||
140 | 45681, 45682, 45683, 45684, 45685, 45686, 45687, 45688, 45689, 45690, 45691, 45692, 45693, 45694, 45695, 45696, |
||
141 | 45697, 45698, 45699, 45700); |
||
142 | $this->assertEquals($expected, $result); |
||
143 | |||
144 | $string = 'ﹰﹱﹲﹳﹴﹶﹷﹸﹹﹺﹻﹼﹽﹾﹿﺀﺁﺂﺃﺄﺅﺆﺇﺈﺉﺊﺋﺌﺍﺎﺏﺐﺑﺒﺓﺔﺕﺖﺗﺘﺙﺚﺛﺜﺝﺞﺟﺠﺡﺢﺣﺤﺥﺦﺧﺨﺩﺪﺫﺬﺭﺮﺯﺰ'; |
||
145 | $result = Multibyte::utf8($string); |
||
146 | $expected = array(65136, 65137, 65138, 65139, 65140, 65141, 65142, 65143, 65144, 65145, 65146, 65147, 65148, 65149, 65150, 65151, |
||
147 | 65152, 65153, 65154, 65155, 65156, 65157, 65158, 65159, 65160, 65161, 65162, 65163, 65164, 65165, 65166, 65167, |
||
148 | 65168, 65169, 65170, 65171, 65172, 65173, 65174, 65175, 65176, 65177, 65178, 65179, 65180, 65181, 65182, 65183, |
||
149 | 65184, 65185, 65186, 65187, 65188, 65189, 65190, 65191, 65192, 65193, 65194, 65195, 65196, 65197, 65198, 65199, |
||
150 | 65200);
|
||
151 | $this->assertEquals($expected, $result); |
||
152 | |||
153 | $string = 'ﺱﺲﺳﺴﺵﺶﺷﺸﺹﺺﺻﺼﺽﺾﺿﻀﻁﻂﻃﻄﻅﻆﻇﻈﻉﻊﻋﻌﻍﻎﻏﻐﻑﻒﻓﻔﻕﻖﻗﻘﻙﻚﻛﻜﻝﻞﻟﻠﻡﻢﻣﻤﻥﻦﻧﻨﻩﻪﻫﻬﻭﻮﻯﻰﻱﻲﻳﻴﻵﻶﻷﻸﻹﻺﻻﻼ'; |
||
154 | $result = Multibyte::utf8($string); |
||
155 | $expected = array(65201, 65202, 65203, 65204, 65205, 65206, 65207, 65208, 65209, 65210, 65211, 65212, 65213, 65214, 65215, 65216, |
||
156 | 65217, 65218, 65219, 65220, 65221, 65222, 65223, 65224, 65225, 65226, 65227, 65228, 65229, 65230, 65231, 65232, |
||
157 | 65233, 65234, 65235, 65236, 65237, 65238, 65239, 65240, 65241, 65242, 65243, 65244, 65245, 65246, 65247, 65248, |
||
158 | 65249, 65250, 65251, 65252, 65253, 65254, 65255, 65256, 65257, 65258, 65259, 65260, 65261, 65262, 65263, 65264, |
||
159 | 65265, 65266, 65267, 65268, 65269, 65270, 65271, 65272, 65273, 65274, 65275, 65276); |
||
160 | $this->assertEquals($expected, $result); |
||
161 | |||
162 | $string = 'abcdefghijklmnopqrstuvwxyz'; |
||
163 | $result = Multibyte::utf8($string); |
||
164 | $expected = array(65345, 65346, 65347, 65348, 65349, 65350, 65351, 65352, 65353, 65354, 65355, 65356, 65357, 65358, 65359, 65360, |
||
165 | 65361, 65362, 65363, 65364, 65365, 65366, 65367, 65368, 65369, 65370); |
||
166 | $this->assertEquals($expected, $result); |
||
167 | |||
168 | $string = '。「」、・ヲァィゥェォャュョッーアイウエオカキク'; |
||
169 | $result = Multibyte::utf8($string); |
||
170 | $expected = array(65377, 65378, 65379, 65380, 65381, 65382, 65383, 65384, 65385, 65386, 65387, 65388, 65389, 65390, 65391, 65392, |
||
171 | 65393, 65394, 65395, 65396, 65397, 65398, 65399, 65400); |
||
172 | $this->assertEquals($expected, $result); |
||
173 | |||
174 | $string = 'ケコサシスセソタチツテトナニヌネノハヒフヘホマミムメモヤユヨラリルレロワン゙'; |
||
175 | $result = Multibyte::utf8($string); |
||
176 | $expected = array(65401, 65402, 65403, 65404, 65405, 65406, 65407, 65408, 65409, 65410, 65411, 65412, 65413, 65414, 65415, 65416, |
||
177 | 65417, 65418, 65419, 65420, 65421, 65422, 65423, 65424, 65425, 65426, 65427, 65428, 65429, 65430, 65431, 65432, |
||
178 | 65433, 65434, 65435, 65436, 65437, 65438); |
||
179 | $this->assertEquals($expected, $result); |
||
180 | |||
181 | $string = 'Ĥēĺļŏ, Ŵőřļď!'; |
||
182 | $result = Multibyte::utf8($string); |
||
183 | $expected = array(292, 275, 314, 316, 335, 44, 32, 372, 337, 345, 316, 271, 33); |
||
184 | $this->assertEquals($expected, $result); |
||
185 | |||
186 | $string = 'Hello, World!'; |
||
187 | $result = Multibyte::utf8($string); |
||
188 | $expected = array(72, 101, 108, 108, 111, 44, 32, 87, 111, 114, 108, 100, 33); |
||
189 | $this->assertEquals($expected, $result); |
||
190 | |||
191 | $string = '¨'; |
||
192 | $result = Multibyte::utf8($string); |
||
193 | $expected = array(168); |
||
194 | $this->assertEquals($expected, $result); |
||
195 | |||
196 | $string = '¿'; |
||
197 | $result = Multibyte::utf8($string); |
||
198 | $expected = array(191); |
||
199 | $this->assertEquals($expected, $result); |
||
200 | |||
201 | $string = 'čini'; |
||
202 | $result = Multibyte::utf8($string); |
||
203 | $expected = array(269, 105, 110, 105); |
||
204 | $this->assertEquals($expected, $result); |
||
205 | |||
206 | $string = 'moći'; |
||
207 | $result = Multibyte::utf8($string); |
||
208 | $expected = array(109, 111, 263, 105); |
||
209 | $this->assertEquals($expected, $result); |
||
210 | |||
211 | $string = 'državni'; |
||
212 | $result = Multibyte::utf8($string); |
||
213 | $expected = array(100, 114, 382, 97, 118, 110, 105); |
||
214 | $this->assertEquals($expected, $result); |
||
215 | |||
216 | $string = '把百度设为首页'; |
||
217 | $result = Multibyte::utf8($string); |
||
218 | $expected = array(25226, 30334, 24230, 35774, 20026, 39318, 39029); |
||
219 | $this->assertEquals($expected, $result); |
||
220 | |||
221 | $string = '一二三周永龍'; |
||
222 | $result = Multibyte::utf8($string); |
||
223 | $expected = array(19968, 20108, 19977, 21608, 27704, 40845); |
||
224 | $this->assertEquals($expected, $result); |
||
225 | |||
226 | $string = 'ԀԂԄԆԈԊԌԎԐԒ'; |
||
227 | $result = Multibyte::utf8($string); |
||
228 | $expected = array(1280, 1282, 1284, 1286, 1288, 1290, 1292, 1294, 1296, 1298); |
||
229 | $this->assertEquals($expected, $result); |
||
230 | |||
231 | $string = 'ԁԃԅԇԉԋԍԏԐԒ'; |
||
232 | $result = Multibyte::utf8($string); |
||
233 | $expected = array(1281, 1283, 1285, 1287, 1289, 1291, 1293, 1295, 1296, 1298); |
||
234 | $this->assertEquals($expected, $result); |
||
235 | |||
236 | $string = 'ԱԲԳԴԵԶԷԸԹԺԻԼԽԾԿՀՁՂՃՄՅՆՇՈՉՊՋՌՍՎՏՐՑՒՓՔՕՖև'; |
||
237 | $result = Multibyte::utf8($string); |
||
238 | $expected = array(1329, 1330, 1331, 1332, 1333, 1334, 1335, 1336, 1337, 1338, 1339, 1340, 1341, 1342, 1343, 1344, 1345, 1346, |
||
239 | 1347, 1348, 1349, 1350, 1351, 1352, 1353, 1354, 1355, 1356, 1357, 1358, 1359, 1360, 1361, 1362, 1363, 1364, |
||
240 | 1365, 1366, 1415); |
||
241 | $this->assertEquals($expected, $result); |
||
242 | |||
243 | $string = 'աբգդեզէըթժիլխծկհձղճմյնշոչպջռսվտրցւփքօֆև'; |
||
244 | $result = Multibyte::utf8($string); |
||
245 | $expected = array(1377, 1378, 1379, 1380, 1381, 1382, 1383, 1384, 1385, 1386, 1387, 1388, 1389, 1390, 1391, 1392, 1393, 1394, |
||
246 | 1395, 1396, 1397, 1398, 1399, 1400, 1401, 1402, 1403, 1404, 1405, 1406, 1407, 1408, 1409, 1410, 1411, 1412, |
||
247 | 1413, 1414, 1415); |
||
248 | $this->assertEquals($expected, $result); |
||
249 | |||
250 | $string = 'ႠႡႢႣႤႥႦႧႨႩႪႫႬႭႮႯႰႱႲႳႴႵႶႷႸႹႺႻႼႽႾႿჀჁჂჃჄჅ'; |
||
251 | $result = Multibyte::utf8($string); |
||
252 | $expected = array(4256, 4257, 4258, 4259, 4260, 4261, 4262, 4263, 4264, 4265, 4266, 4267, 4268, 4269, 4270, 4271, 4272, 4273, |
||
253 | 4274, 4275, 4276, 4277, 4278, 4279, 4280, 4281, 4282, 4283, 4284, 4285, 4286, 4287, 4288, 4289, 4290, 4291, |
||
254 | 4292, 4293); |
||
255 | $this->assertEquals($expected, $result); |
||
256 | |||
257 | $string = 'ḀḂḄḆḈḊḌḎḐḒḔḖḘḚḜḞḠḢḤḦḨḪḬḮḰḲḴḶḸḺḼḾṀṂṄṆṈṊṌṎṐṒṔṖṘṚṜṞṠṢṤṦṨṪṬṮṰṲṴṶṸṺṼṾẀẂẄẆẈẊẌẎẐẒẔẖẗẘẙẚẠẢẤẦẨẪẬẮẰẲẴẶẸẺẼẾỀỂỄỆỈỊỌỎỐỒỔỖỘỚỜỞỠỢỤỦỨỪỬỮỰỲỴỶỸ'; |
||
258 | $result = Multibyte::utf8($string); |
||
259 | $expected = array(7680, 7682, 7684, 7686, 7688, 7690, 7692, 7694, 7696, 7698, 7700, 7702, 7704, 7706, 7708, 7710, 7712, 7714, |
||
260 | 7716, 7718, 7720, 7722, 7724, 7726, 7728, 7730, 7732, 7734, 7736, 7738, 7740, 7742, 7744, 7746, 7748, 7750, |
||
261 | 7752, 7754, 7756, 7758, 7760, 7762, 7764, 7766, 7768, 7770, 7772, 7774, 7776, 7778, 7780, 7782, 7784, 7786, |
||
262 | 7788, 7790, 7792, 7794, 7796, 7798, 7800, 7802, 7804, 7806, 7808, 7810, 7812, 7814, 7816, 7818, 7820, 7822, |
||
263 | 7824, 7826, 7828, 7830, 7831, 7832, 7833, 7834, 7840, 7842, 7844, 7846, 7848, 7850, 7852, 7854, 7856, |
||
264 | 7858, 7860, 7862, 7864, 7866, 7868, 7870, 7872, 7874, 7876, 7878, 7880, 7882, 7884, 7886, 7888, 7890, 7892, |
||
265 | 7894, 7896, 7898, 7900, 7902, 7904, 7906, 7908, 7910, 7912, 7914, 7916, 7918, 7920, 7922, 7924, 7926, 7928); |
||
266 | $this->assertEquals($expected, $result); |
||
267 | |||
268 | $string = 'ḁḃḅḇḉḋḍḏḑḓḕḗḙḛḝḟḡḣḥḧḩḫḭḯḱḳḵḷḹḻḽḿṁṃṅṇṉṋṍṏṑṓṕṗṙṛṝṟṡṣṥṧṩṫṭṯṱṳṵṷṹṻṽṿẁẃẅẇẉẋẍẏẑẓẕẖẗẘẙẚạảấầẩẫậắằẳẵặẹẻẽếềểễệỉịọỏốồổỗộớờởỡợụủứừửữựỳỵỷỹ'; |
||
269 | $result = Multibyte::utf8($string); |
||
270 | $expected = array(7681, 7683, 7685, 7687, 7689, 7691, 7693, 7695, 7697, 7699, 7701, 7703, 7705, 7707, 7709, 7711, 7713, 7715, |
||
271 | 7717, 7719, 7721, 7723, 7725, 7727, 7729, 7731, 7733, 7735, 7737, 7739, 7741, 7743, 7745, 7747, 7749, 7751, |
||
272 | 7753, 7755, 7757, 7759, 7761, 7763, 7765, 7767, 7769, 7771, 7773, 7775, 7777, 7779, 7781, 7783, 7785, 7787, |
||
273 | 7789, 7791, 7793, 7795, 7797, 7799, 7801, 7803, 7805, 7807, 7809, 7811, 7813, 7815, 7817, 7819, 7821, 7823, |
||
274 | 7825, 7827, 7829, 7830, 7831, 7832, 7833, 7834, 7841, 7843, 7845, 7847, 7849, 7851, 7853, 7855, 7857, 7859, |
||
275 | 7861, 7863, 7865, 7867, 7869, 7871, 7873, 7875, 7877, 7879, 7881, 7883, 7885, 7887, 7889, 7891, 7893, 7895, |
||
276 | 7897, 7899, 7901, 7903, 7905, 7907, 7909, 7911, 7913, 7915, 7917, 7919, 7921, 7923, 7925, 7927, 7929); |
||
277 | $this->assertEquals($expected, $result); |
||
278 | |||
279 | $string = 'ΩKÅℲ'; |
||
280 | $result = Multibyte::utf8($string); |
||
281 | $expected = array(8486, 8490, 8491, 8498); |
||
282 | $this->assertEquals($expected, $result); |
||
283 | |||
284 | $string = 'ωkåⅎ'; |
||
285 | $result = Multibyte::utf8($string); |
||
286 | $expected = array(969, 107, 229, 8526); |
||
287 | $this->assertEquals($expected, $result); |
||
288 | |||
289 | $string = 'ⅠⅡⅢⅣⅤⅥⅦⅧⅨⅩⅪⅫⅬⅭⅮⅯↃ'; |
||
290 | $result = Multibyte::utf8($string); |
||
291 | $expected = array(8544, 8545, 8546, 8547, 8548, 8549, 8550, 8551, 8552, 8553, 8554, 8555, 8556, 8557, 8558, 8559, 8579); |
||
292 | $this->assertEquals($expected, $result); |
||
293 | |||
294 | $string = 'ⅰⅱⅲⅳⅴⅵⅶⅷⅸⅹⅺⅻⅼⅽⅾⅿↄ'; |
||
295 | $result = Multibyte::utf8($string); |
||
296 | $expected = array(8560, 8561, 8562, 8563, 8564, 8565, 8566, 8567, 8568, 8569, 8570, 8571, 8572, 8573, 8574, 8575, 8580); |
||
297 | $this->assertEquals($expected, $result); |
||
298 | |||
299 | $string = 'ⒶⒷⒸⒹⒺⒻⒼⒽⒾⒿⓀⓁⓂⓃⓄⓅⓆⓇⓈⓉⓊⓋⓌⓍⓎⓏ'; |
||
300 | $result = Multibyte::utf8($string); |
||
301 | $expected = array(9398, 9399, 9400, 9401, 9402, 9403, 9404, 9405, 9406, 9407, 9408, 9409, 9410, 9411, 9412, 9413, 9414, |
||
302 | 9415, 9416, 9417, 9418, 9419, 9420, 9421, 9422, 9423); |
||
303 | $this->assertEquals($expected, $result); |
||
304 | |||
305 | $string = 'ⓐⓑⓒⓓⓔⓕⓖⓗⓘⓙⓚⓛⓜⓝⓞⓟⓠⓡⓢⓣⓤⓥⓦⓧⓨⓩ'; |
||
306 | $result = Multibyte::utf8($string); |
||
307 | $expected = array(9424, 9425, 9426, 9427, 9428, 9429, 9430, 9431, 9432, 9433, 9434, 9435, 9436, 9437, 9438, 9439, 9440, 9441, |
||
308 | 9442, 9443, 9444, 9445, 9446, 9447, 9448, 9449); |
||
309 | $this->assertEquals($expected, $result); |
||
310 | |||
311 | $string = 'ⰀⰁⰂⰃⰄⰅⰆⰇⰈⰉⰊⰋⰌⰍⰎⰏⰐⰑⰒⰓⰔⰕⰖⰗⰘⰙⰚⰛⰜⰝⰞⰟⰠⰡⰢⰣⰤⰥⰦⰧⰨⰩⰪⰫⰬⰭⰮ'; |
||
312 | $result = Multibyte::utf8($string); |
||
313 | $expected = array(11264, 11265, 11266, 11267, 11268, 11269, 11270, 11271, 11272, 11273, 11274, 11275, 11276, 11277, 11278, |
||
314 | 11279, 11280, 11281, 11282, 11283, 11284, 11285, 11286, 11287, 11288, 11289, 11290, 11291, 11292, 11293, |
||
315 | 11294, 11295, 11296, 11297, 11298, 11299, 11300, 11301, 11302, 11303, 11304, 11305, 11306, 11307, 11308, |
||
316 | 11309, 11310); |
||
317 | $this->assertEquals($expected, $result); |
||
318 | |||
319 | $string = 'ⰰⰱⰲⰳⰴⰵⰶⰷⰸⰹⰺⰻⰼⰽⰾⰿⱀⱁⱂⱃⱄⱅⱆⱇⱈⱉⱊⱋⱌⱍⱎⱏⱐⱑⱒⱓⱔⱕⱖⱗⱘⱙⱚⱛⱜⱝⱞ'; |
||
320 | $result = Multibyte::utf8($string); |
||
321 | $expected = array(11312, 11313, 11314, 11315, 11316, 11317, 11318, 11319, 11320, 11321, 11322, 11323, 11324, 11325, 11326, 11327, |
||
322 | 11328, 11329, 11330, 11331, 11332, 11333, 11334, 11335, 11336, 11337, 11338, 11339, 11340, 11341, 11342, 11343, |
||
323 | 11344, 11345, 11346, 11347, 11348, 11349, 11350, 11351, 11352, 11353, 11354, 11355, 11356, 11357, 11358); |
||
324 | $this->assertEquals($expected, $result); |
||
325 | |||
326 | $string = 'ⲀⲂⲄⲆⲈⲊⲌⲎⲐⲒⲔⲖⲘⲚⲜⲞⲠⲢⲤⲦⲨⲪⲬⲮⲰⲲⲴⲶⲸⲺⲼⲾⳀⳂⳄⳆⳈⳊⳌⳎⳐⳒⳔⳖⳘⳚⳜⳞⳠⳢ'; |
||
327 | $result = Multibyte::utf8($string); |
||
328 | $expected = array(11392, 11394, 11396, 11398, 11400, 11402, 11404, 11406, 11408, 11410, 11412, 11414, 11416, 11418, 11420, |
||
329 | 11422, 11424, 11426, 11428, 11430, 11432, 11434, 11436, 11438, 11440, 11442, 11444, 11446, 11448, 11450, |
||
330 | 11452, 11454, 11456, 11458, 11460, 11462, 11464, 11466, 11468, 11470, 11472, 11474, 11476, 11478, 11480, |
||
331 | 11482, 11484, 11486, 11488, 11490); |
||
332 | $this->assertEquals($expected, $result); |
||
333 | |||
334 | $string = 'ⲁⲃⲅⲇⲉⲋⲍⲏⲑⲓⲕⲗⲙⲛⲝⲟⲡⲣⲥⲧⲩⲫⲭⲯⲱⲳⲵⲷⲹⲻⲽⲿⳁⳃⳅⳇⳉⳋⳍⳏⳑⳓⳕⳗⳙⳛⳝⳟⳡⳣ'; |
||
335 | $result = Multibyte::utf8($string); |
||
336 | $expected = array(11393, 11395, 11397, 11399, 11401, 11403, 11405, 11407, 11409, 11411, 11413, 11415, 11417, 11419, 11421, 11423, |
||
337 | 11425, 11427, 11429, 11431, 11433, 11435, 11437, 11439, 11441, 11443, 11445, 11447, 11449, 11451, 11453, 11455, |
||
338 | 11457, 11459, 11461, 11463, 11465, 11467, 11469, 11471, 11473, 11475, 11477, 11479, 11481, 11483, 11485, 11487, |
||
339 | 11489, 11491); |
||
340 | $this->assertEquals($expected, $result); |
||
341 | |||
342 | $string = 'fffiflffifflſtstﬓﬔﬕﬖﬗ'; |
||
343 | $result = Multibyte::utf8($string); |
||
344 | $expected = array(64256, 64257, 64258, 64259, 64260, 64261, 64262, 64275, 64276, 64277, 64278, 64279); |
||
345 | $this->assertEquals($expected, $result); |
||
346 | } |
||
347 | |||
348 | /**
|
||
349 | * testAscii method
|
||
350 | *
|
||
351 | * @return void
|
||
352 | */
|
||
353 | public function testAscii() { |
||
354 | $input = array(33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, |
||
355 | 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, |
||
356 | 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, |
||
357 | 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126); |
||
358 | $result = Multibyte::ascii($input); |
||
359 | |||
360 | $expected = '!"#$%&\'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~'; |
||
361 | $this->assertEquals($expected, $result); |
||
362 | |||
363 | $input = array(161, 162, 163, 164, 165, 166, 167, 168, 169, 170, 171, 172, 173, 174, 175, 176, 177, 178, 179, 180, 181, |
||
364 | 182, 183, 184, 185, 186, 187, 188, 189, 190, 191, 192, 193, 194, 195, 196, 197, 198, 199, 200); |
||
365 | $result = Multibyte::ascii($input); |
||
366 | |||
367 | $expected = '¡¢£¤¥¦§¨©ª«¬®¯°±²³´µ¶·¸¹º»¼½¾¿ÀÁÂÃÄÅÆÇÈ'; |
||
368 | $this->assertEquals($expected, $result); |
||
369 | |||
370 | $input = array(201, 202, 203, 204, 205, 206, 207, 208, 209, 210, 211, 212, 213, 214, 215, 216, 217, 218, 219, 220, 221, |
||
371 | 222, 223, 224, 225, 226, 227, 228, 229, 230, 231, 232, 233, 234, 235, 236, 237, 238, 239, 240, 241, 242, |
||
372 | 243, 244, 245, 246, 247, 248, 249, 250, 251, 252, 253, 254, 255, 256, 257, 258, 259, 260, 261, 262, 263, |
||
373 | 264, 265, 266, 267, 268, 269, 270, 271, 272, 273, 274, 275, 276, 277, 278, 279, 280, 281, 282, 283, 284, |
||
374 | 285, 286, 287, 288, 289, 290, 291, 292, 293, 294, 295, 296, 297, 298, 299, 300); |
||
375 | $result = Multibyte::ascii($input); |
||
376 | $expected = 'ÉÊËÌÍÎÏÐÑÒÓÔÕÖ×ØÙÚÛÜÝÞßàáâãäåæçèéêëìíîïðñòóôõö÷øùúûüýþÿĀāĂ㥹ĆćĈĉĊċČčĎďĐđĒēĔĕĖėĘęĚěĜĝĞğĠġĢģĤĥĦħĨĩĪīĬ'; |
||
377 | $this->assertEquals($expected, $result); |
||
378 | |||
379 | $input = array(301, 302, 303, 304, 305, 306, 307, 308, 309, 310, 311, 312, 313, 314, 315, 316, 317, 318, 319, 320, 321, |
||
380 | 322, 323, 324, 325, 326, 327, 328, 329, 330, 331, 332, 333, 334, 335, 336, 337, 338, 339, 340, 341, 342, |
||
381 | 343, 344, 345, 346, 347, 348, 349, 350, 351, 352, 353, 354, 355, 356, 357, 358, 359, 360, 361, 362, 363, |
||
382 | 364, 365, 366, 367, 368, 369, 370, 371, 372, 373, 374, 375, 376, 377, 378, 379, 380, 381, 382, 383, 384, |
||
383 | 385, 386, 387, 388, 389, 390, 391, 392, 393, 394, 395, 396, 397, 398, 399, 400); |
||
384 | $expected = 'ĭĮįİıIJijĴĵĶķĸĹĺĻļĽľĿŀŁłŃńŅņŇňʼnŊŋŌōŎŏŐőŒœŔŕŖŗŘřŚśŜŝŞşŠšŢţŤťŦŧŨũŪūŬŭŮůŰűŲųŴŵŶŷŸŹźŻżŽžſƀƁƂƃƄƅƆƇƈƉƊƋƌƍƎƏƐ'; |
||
385 | $result = Multibyte::ascii($input); |
||
386 | $this->assertEquals($expected, $result); |
||
387 | |||
388 | $input = array(401, 402, 403, 404, 405, 406, 407, 408, 409, 410, 411, 412, 413, 414, 415, 416, 417, 418, 419, 420, 421, |
||
389 | 422, 423, 424, 425, 426, 427, 428, 429, 430, 431, 432, 433, 434, 435, 436, 437, 438, 439, 440, 441, 442, |
||
390 | 443, 444, 445, 446, 447, 448, 449, 450, 451, 452, 453, 454, 455, 456, 457, 458, 459, 460, 461, 462, 463, |
||
391 | 464, 465, 466, 467, 468, 469, 470, 471, 472, 473, 474, 475, 476, 477, 478, 479, 480, 481, 482, 483, 484, |
||
392 | 485, 486, 487, 488, 489, 490, 491, 492, 493, 494, 495, 496, 497, 498, 499, 500); |
||
393 | $expected = 'ƑƒƓƔƕƖƗƘƙƚƛƜƝƞƟƠơƢƣƤƥƦƧƨƩƪƫƬƭƮƯưƱƲƳƴƵƶƷƸƹƺƻƼƽƾƿǀǁǂǃDŽDždžLJLjljNJNjnjǍǎǏǐǑǒǓǔǕǖǗǘǙǚǛǜǝǞǟǠǡǢǣǤǥǦǧǨǩǪǫǬǭǮǯǰDZDzdzǴ'; |
||
394 | $result = Multibyte::ascii($input); |
||
395 | $this->assertEquals($expected, $result); |
||
396 | |||
397 | $input = array(601, 602, 603, 604, 605, 606, 607, 608, 609, 610, 611, 612, 613, 614, 615, 616, 617, 618, 619, 620, 621, |
||
398 | 622, 623, 624, 625, 626, 627, 628, 629, 630, 631, 632, 633, 634, 635, 636, 637, 638, 639, 640, 641, 642, |
||
399 | 643, 644, 645, 646, 647, 648, 649, 650, 651, 652, 653, 654, 655, 656, 657, 658, 659, 660, 661, 662, 663, |
||
400 | 664, 665, 666, 667, 668, 669, 670, 671, 672, 673, 674, 675, 676, 677, 678, 679, 680, 681, 682, 683, 684, |
||
401 | 685, 686, 687, 688, 689, 690, 691, 692, 693, 694, 695, 696, 697, 698, 699, 700); |
||
402 | $expected = 'əɚɛɜɝɞɟɠɡɢɣɤɥɦɧɨɩɪɫɬɭɮɯɰɱɲɳɴɵɶɷɸɹɺɻɼɽɾɿʀʁʂʃʄʅʆʇʈʉʊʋʌʍʎʏʐʑʒʓʔʕʖʗʘʙʚʛʜʝʞʟʠʡʢʣʤʥʦʧʨʩʪʫʬʭʮʯʰʱʲʳʴʵʶʷʸʹʺʻʼ'; |
||
403 | $result = Multibyte::ascii($input); |
||
404 | $this->assertEquals($expected, $result); |
||
405 | |||
406 | $input = array(1024, 1025, 1026, 1027, 1028, 1029, 1030, 1031, 1032, 1033, 1034, 1035, 1036, 1037, 1038, 1039, 1040, 1041, |
||
407 | 1042, 1043, 1044, 1045, 1046, 1047, 1048, 1049, 1050, 1051); |
||
408 | $expected = 'ЀЁЂЃЄЅІЇЈЉЊЋЌЍЎЏАБВГДЕЖЗИЙКЛ'; |
||
409 | $result = Multibyte::ascii($input); |
||
410 | $this->assertEquals($expected, $result); |
||
411 | |||
412 | $input = array(1052, 1053, 1054, 1055, 1056, 1057, 1058, 1059, 1060, 1061, 1062, 1063, 1064, 1065, 1066, 1067, 1068, 1069, |
||
413 | 1070, 1071, 1072, 1073, 1074, 1075, 1076, 1077, 1078, 1079, 1080, 1081, 1082, 1083, 1084, 1085, 1086, 1087, |
||
414 | 1088, 1089, 1090, 1091, 1092, 1093, 1094, 1095, 1096, 1097, 1098, 1099, 1100); |
||
415 | $expected = 'МНОПРСТУФХЦЧШЩЪЫЬЭЮЯабвгдежзийклмнопрстуфхцчшщъыь'; |
||
416 | $result = Multibyte::ascii($input); |
||
417 | $this->assertEquals($expected, $result); |
||
418 | |||
419 | $input = array(1401, 1402, 1403, 1404, 1405, 1406, 1407); |
||
420 | $expected = 'չպջռսվտ'; |
||
421 | $result = Multibyte::ascii($input); |
||
422 | $this->assertEquals($expected, $result); |
||
423 | |||
424 | $input = array(1601, 1602, 1603, 1604, 1605, 1606, 1607, 1608, 1609, 1610, 1611, 1612, 1613, 1614, 1615); |
||
425 | $expected = 'فقكلمنهوىيًٌٍَُ'; |
||
426 | $result = Multibyte::ascii($input); |
||
427 | $this->assertEquals($expected, $result); |
||
428 | |||
429 | $input = array(10032, 10033, 10034, 10035, 10036, 10037, 10038, 10039, 10040, 10041, 10042, 10043, 10044, |
||
430 | 10045, 10046, 10047, 10048, 10049, 10050, 10051, 10052, 10053, 10054, 10055, 10056, 10057, |
||
431 | 10058, 10059, 10060, 10061, 10062, 10063, 10064, 10065, 10066, 10067, 10068, 10069, 10070, |
||
432 | 10071, 10072, 10073, 10074, 10075, 10076, 10077, 10078); |
||
433 | $expected = '✰✱✲✳✴✵✶✷✸✹✺✻✼✽✾✿❀❁❂❃❄❅❆❇❈❉❊❋❌❍❎❏❐❑❒❓❔❕❖❗❘❙❚❛❜❝❞'; |
||
434 | $result = Multibyte::ascii($input); |
||
435 | $this->assertEquals($expected, $result); |
||
436 | |||
437 | $input = array(11904, 11905, 11906, 11907, 11908, 11909, 11910, 11911, 11912, 11913, 11914, 11915, 11916, 11917, 11918, 11919, |
||
438 | 11920, 11921, 11922, 11923, 11924, 11925, 11926, 11927, 11928, 11929, 11931, 11932, 11933, 11934, 11935, 11936, |
||
439 | 11937, 11938, 11939, 11940, 11941, 11942, 11943, 11944, 11945, 11946, 11947, 11948, 11949, 11950, 11951, 11952, |
||
440 | 11953, 11954, 11955, 11956, 11957, 11958, 11959, 11960, 11961, 11962, 11963, 11964, 11965, 11966, 11967, 11968, |
||
441 | 11969, 11970, 11971, 11972, 11973, 11974, 11975, 11976, 11977, 11978, 11979, 11980, 11981, 11982, 11983, 11984, |
||
442 | 11985, 11986, 11987, 11988, 11989, 11990, 11991, 11992, 11993, 11994, 11995, 11996, 11997, 11998, 11999, 12000); |
||
443 | $expected = '⺀⺁⺂⺃⺄⺅⺆⺇⺈⺉⺊⺋⺌⺍⺎⺏⺐⺑⺒⺓⺔⺕⺖⺗⺘⺙⺛⺜⺝⺞⺟⺠⺡⺢⺣⺤⺥⺦⺧⺨⺩⺪⺫⺬⺭⺮⺯⺰⺱⺲⺳⺴⺵⺶⺷⺸⺹⺺⺻⺼⺽⺾⺿⻀⻁⻂⻃⻄⻅⻆⻇⻈⻉⻊⻋⻌⻍⻎⻏⻐⻑⻒⻓⻔⻕⻖⻗⻘⻙⻚⻛⻜⻝⻞⻟⻠'; |
||
444 | $result = Multibyte::ascii($input); |
||
445 | $this->assertEquals($expected, $result); |
||
446 | |||
447 | $input = array(12101, 12102, 12103, 12104, 12105, 12106, 12107, 12108, 12109, 12110, 12111, 12112, 12113, 12114, 12115, 12116, |
||
448 | 12117, 12118, 12119, 12120, 12121, 12122, 12123, 12124, 12125, 12126, 12127, 12128, 12129, 12130, 12131, 12132, |
||
449 | 12133, 12134, 12135, 12136, 12137, 12138, 12139, 12140, 12141, 12142, 12143, 12144, 12145, 12146, 12147, 12148, |
||
450 | 12149, 12150, 12151, 12152, 12153, 12154, 12155, 12156, 12157, 12158, 12159); |
||
451 | $expected = '⽅⽆⽇⽈⽉⽊⽋⽌⽍⽎⽏⽐⽑⽒⽓⽔⽕⽖⽗⽘⽙⽚⽛⽜⽝⽞⽟⽠⽡⽢⽣⽤⽥⽦⽧⽨⽩⽪⽫⽬⽭⽮⽯⽰⽱⽲⽳⽴⽵⽶⽷⽸⽹⽺⽻⽼⽽⽾⽿'; |
||
452 | $result = Multibyte::ascii($input); |
||
453 | $this->assertEquals($expected, $result); |
||
454 | |||
455 | $input = array(45601, 45602, 45603, 45604, 45605, 45606, 45607, 45608, 45609, 45610, 45611, 45612, 45613, 45614, 45615, 45616, |
||
456 | 45617, 45618, 45619, 45620, 45621, 45622, 45623, 45624, 45625, 45626, 45627, 45628, 45629, 45630, 45631, 45632, |
||
457 | 45633, 45634, 45635, 45636, 45637, 45638, 45639, 45640, 45641, 45642, 45643, 45644, 45645, 45646, 45647, 45648, |
||
458 | 45649, 45650, 45651, 45652, 45653, 45654, 45655, 45656, 45657, 45658, 45659, 45660, 45661, 45662, 45663, 45664, |
||
459 | 45665, 45666, 45667, 45668, 45669, 45670, 45671, 45672, 45673, 45674, 45675, 45676, 45677, 45678, 45679, 45680, |
||
460 | 45681, 45682, 45683, 45684, 45685, 45686, 45687, 45688, 45689, 45690, 45691, 45692, 45693, 45694, 45695, 45696, |
||
461 | 45697, 45698, 45699, 45700); |
||
462 | $expected = '눡눢눣눤눥눦눧눨눩눪눫눬눭눮눯눰눱눲눳눴눵눶눷눸눹눺눻눼눽눾눿뉀뉁뉂뉃뉄뉅뉆뉇뉈뉉뉊뉋뉌뉍뉎뉏뉐뉑뉒뉓뉔뉕뉖뉗뉘뉙뉚뉛뉜뉝뉞뉟뉠뉡뉢뉣뉤뉥뉦뉧뉨뉩뉪뉫뉬뉭뉮뉯뉰뉱뉲뉳뉴뉵뉶뉷뉸뉹뉺뉻뉼뉽뉾뉿늀늁늂늃늄'; |
||
463 | $result = Multibyte::ascii($input); |
||
464 | $this->assertEquals($expected, $result); |
||
465 | |||
466 | $input = array(65136, 65137, 65138, 65139, 65140, 65141, 65142, 65143, 65144, 65145, 65146, 65147, 65148, 65149, 65150, 65151, |
||
467 | 65152, 65153, 65154, 65155, 65156, 65157, 65158, 65159, 65160, 65161, 65162, 65163, 65164, 65165, 65166, 65167, |
||
468 | 65168, 65169, 65170, 65171, 65172, 65173, 65174, 65175, 65176, 65177, 65178, 65179, 65180, 65181, 65182, 65183, |
||
469 | 65184, 65185, 65186, 65187, 65188, 65189, 65190, 65191, 65192, 65193, 65194, 65195, 65196, 65197, 65198, 65199, |
||
470 | 65200);
|
||
471 | $expected = 'ﹰﹱﹲﹳﹴﹶﹷﹸﹹﹺﹻﹼﹽﹾﹿﺀﺁﺂﺃﺄﺅﺆﺇﺈﺉﺊﺋﺌﺍﺎﺏﺐﺑﺒﺓﺔﺕﺖﺗﺘﺙﺚﺛﺜﺝﺞﺟﺠﺡﺢﺣﺤﺥﺦﺧﺨﺩﺪﺫﺬﺭﺮﺯﺰ'; |
||
472 | $result = Multibyte::ascii($input); |
||
473 | $this->assertEquals($expected, $result); |
||
474 | |||
475 | $input = array(65201, 65202, 65203, 65204, 65205, 65206, 65207, 65208, 65209, 65210, 65211, 65212, 65213, 65214, 65215, 65216, |
||
476 | 65217, 65218, 65219, 65220, 65221, 65222, 65223, 65224, 65225, 65226, 65227, 65228, 65229, 65230, 65231, 65232, |
||
477 | 65233, 65234, 65235, 65236, 65237, 65238, 65239, 65240, 65241, 65242, 65243, 65244, 65245, 65246, 65247, 65248, |
||
478 | 65249, 65250, 65251, 65252, 65253, 65254, 65255, 65256, 65257, 65258, 65259, 65260, 65261, 65262, 65263, 65264, |
||
479 | 65265, 65266, 65267, 65268, 65269, 65270, 65271, 65272, 65273, 65274, 65275, 65276); |
||
480 | $expected = 'ﺱﺲﺳﺴﺵﺶﺷﺸﺹﺺﺻﺼﺽﺾﺿﻀﻁﻂﻃﻄﻅﻆﻇﻈﻉﻊﻋﻌﻍﻎﻏﻐﻑﻒﻓﻔﻕﻖﻗﻘﻙﻚﻛﻜﻝﻞﻟﻠﻡﻢﻣﻤﻥﻦﻧﻨﻩﻪﻫﻬﻭﻮﻯﻰﻱﻲﻳﻴﻵﻶﻷﻸﻹﻺﻻﻼ'; |
||
481 | $result = Multibyte::ascii($input); |
||
482 | $this->assertEquals($expected, $result); |
||
483 | |||
484 | $input = array(65345, 65346, 65347, 65348, 65349, 65350, 65351, 65352, 65353, 65354, 65355, 65356, 65357, 65358, 65359, 65360, |
||
485 | 65361, 65362, 65363, 65364, 65365, 65366, 65367, 65368, 65369, 65370); |
||
486 | $expected = 'abcdefghijklmnopqrstuvwxyz'; |
||
487 | $result = Multibyte::ascii($input); |
||
488 | $this->assertEquals($expected, $result); |
||
489 | |||
490 | $input = array(65377, 65378, 65379, 65380, 65381, 65382, 65383, 65384, 65385, 65386, 65387, 65388, 65389, 65390, 65391, 65392, |
||
491 | 65393, 65394, 65395, 65396, 65397, 65398, 65399, 65400); |
||
492 | $expected = '。「」、・ヲァィゥェォャュョッーアイウエオカキク'; |
||
493 | $result = Multibyte::ascii($input); |
||
494 | $this->assertEquals($expected, $result); |
||
495 | |||
496 | $input = array(65401, 65402, 65403, 65404, 65405, 65406, 65407, 65408, 65409, 65410, 65411, 65412, 65413, 65414, 65415, 65416, |
||
497 | 65417, 65418, 65419, 65420, 65421, 65422, 65423, 65424, 65425, 65426, 65427, 65428, 65429, 65430, 65431, 65432, |
||
498 | 65433, 65434, 65435, 65436, 65437, 65438); |
||
499 | $expected = 'ケコサシスセソタチツテトナニヌネノハヒフヘホマミムメモヤユヨラリルレロワン゙'; |
||
500 | $result = Multibyte::ascii($input); |
||
501 | $this->assertEquals($expected, $result); |
||
502 | |||
503 | $input = array(292, 275, 314, 316, 335, 44, 32, 372, 337, 345, 316, 271, 33); |
||
504 | $expected = 'Ĥēĺļŏ, Ŵőřļď!'; |
||
505 | $result = Multibyte::ascii($input); |
||
506 | $this->assertEquals($expected, $result); |
||
507 | |||
508 | $input = array(72, 101, 108, 108, 111, 44, 32, 87, 111, 114, 108, 100, 33); |
||
509 | $expected = 'Hello, World!'; |
||
510 | $result = Multibyte::ascii($input); |
||
511 | $this->assertEquals($expected, $result); |
||
512 | |||
513 | $input = array(168); |
||
514 | $expected = '¨'; |
||
515 | $result = Multibyte::ascii($input); |
||
516 | $this->assertEquals($expected, $result); |
||
517 | |||
518 | $input = array(191); |
||
519 | $expected = '¿'; |
||
520 | $result = Multibyte::ascii($input); |
||
521 | $this->assertEquals($expected, $result); |
||
522 | |||
523 | $input = array(269, 105, 110, 105); |
||
524 | $expected = 'čini'; |
||
525 | $result = Multibyte::ascii($input); |
||
526 | $this->assertEquals($expected, $result); |
||
527 | |||
528 | $input = array(109, 111, 263, 105); |
||
529 | $expected = 'moći'; |
||
530 | $result = Multibyte::ascii($input); |
||
531 | $this->assertEquals($expected, $result); |
||
532 | |||
533 | $input = array(100, 114, 382, 97, 118, 110, 105); |
||
534 | $expected = 'državni'; |
||
535 | $result = Multibyte::ascii($input); |
||
536 | $this->assertEquals($expected, $result); |
||
537 | |||
538 | $input = array(25226, 30334, 24230, 35774, 20026, 39318, 39029); |
||
539 | $expected = '把百度设为首页'; |
||
540 | $result = Multibyte::ascii($input); |
||
541 | $this->assertEquals($expected, $result); |
||
542 | |||
543 | $input = array(19968, 20108, 19977, 21608, 27704, 40845); |
||
544 | $expected = '一二三周永龍'; |
||
545 | $result = Multibyte::ascii($input); |
||
546 | $this->assertEquals($expected, $result); |
||
547 | |||
548 | $input = array(1280, 1282, 1284, 1286, 1288, 1290, 1292, 1294, 1296, 1298); |
||
549 | $expected = 'ԀԂԄԆԈԊԌԎԐԒ'; |
||
550 | $result = Multibyte::ascii($input); |
||
551 | $this->assertEquals($expected, $result); |
||
552 | |||
553 | $input = array(1281, 1283, 1285, 1287, 1289, 1291, 1293, 1295, 1296, 1298); |
||
554 | $expected = 'ԁԃԅԇԉԋԍԏԐԒ'; |
||
555 | $result = Multibyte::ascii($input); |
||
556 | $this->assertEquals($expected, $result); |
||
557 | |||
558 | $input = array(1329, 1330, 1331, 1332, 1333, 1334, 1335, 1336, 1337, 1338, 1339, 1340, 1341, 1342, 1343, 1344, 1345, 1346, 1347, |
||
559 | 1348, 1349, 1350, 1351, 1352, 1353, 1354, 1355, 1356, 1357, 1358, 1359, 1360, 1361, 1362, 1363, 1364, 1365, |
||
560 | 1366, 1415); |
||
561 | $result = Multibyte::ascii($input); |
||
562 | $expected = 'ԱԲԳԴԵԶԷԸԹԺԻԼԽԾԿՀՁՂՃՄՅՆՇՈՉՊՋՌՍՎՏՐՑՒՓՔՕՖև'; |
||
563 | $this->assertEquals($expected, $result); |
||
564 | |||
565 | $input = array(1377, 1378, 1379, 1380, 1381, 1382, 1383, 1384, 1385, 1386, 1387, 1388, 1389, 1390, 1391, 1392, 1393, 1394, |
||
566 | 1395, 1396, 1397, 1398, 1399, 1400, 1401, 1402, 1403, 1404, 1405, 1406, 1407, 1408, 1409, 1410, 1411, 1412, |
||
567 | 1413, 1414, 1415); |
||
568 | $result = Multibyte::ascii($input); |
||
569 | $expected = 'աբգդեզէըթժիլխծկհձղճմյնշոչպջռսվտրցւփքօֆև'; |
||
570 | $this->assertEquals($expected, $result); |
||
571 | |||
572 | $input = array(4256, 4257, 4258, 4259, 4260, 4261, 4262, 4263, 4264, 4265, 4266, 4267, 4268, 4269, 4270, 4271, 4272, 4273, 4274, |
||
573 | 4275, 4276, 4277, 4278, 4279, 4280, 4281, 4282, 4283, 4284, 4285, 4286, 4287, 4288, 4289, 4290, 4291, 4292, 4293); |
||
574 | $result = Multibyte::ascii($input); |
||
575 | $expected = 'ႠႡႢႣႤႥႦႧႨႩႪႫႬႭႮႯႰႱႲႳႴႵႶႷႸႹႺႻႼႽႾႿჀჁჂჃჄჅ'; |
||
576 | $this->assertEquals($expected, $result); |
||
577 | |||
578 | $input = array(7680, 7682, 7684, 7686, 7688, 7690, 7692, 7694, 7696, 7698, 7700, 7702, 7704, 7706, 7708, 7710, 7712, 7714, |
||
579 | 7716, 7718, 7720, 7722, 7724, 7726, 7728, 7730, 7732, 7734, 7736, 7738, 7740, 7742, 7744, 7746, 7748, 7750, |
||
580 | 7752, 7754, 7756, 7758, 7760, 7762, 7764, 7766, 7768, 7770, 7772, 7774, 7776, 7778, 7780, 7782, 7784, 7786, |
||
581 | 7788, 7790, 7792, 7794, 7796, 7798, 7800, 7802, 7804, 7806, 7808, 7810, 7812, 7814, 7816, 7818, 7820, 7822, |
||
582 | 7824, 7826, 7828, 7830, 7831, 7832, 7833, 7834, 7840, 7842, 7844, 7846, 7848, 7850, 7852, 7854, 7856, |
||
583 | 7858, 7860, 7862, 7864, 7866, 7868, 7870, 7872, 7874, 7876, 7878, 7880, 7882, 7884, 7886, 7888, 7890, 7892, |
||
584 | 7894, 7896, 7898, 7900, 7902, 7904, 7906, 7908, 7910, 7912, 7914, 7916, 7918, 7920, 7922, 7924, 7926, 7928); |
||
585 | $result = Multibyte::ascii($input); |
||
586 | $expected = 'ḀḂḄḆḈḊḌḎḐḒḔḖḘḚḜḞḠḢḤḦḨḪḬḮḰḲḴḶḸḺḼḾṀṂṄṆṈṊṌṎṐṒṔṖṘṚṜṞṠṢṤṦṨṪṬṮṰṲṴṶṸṺṼṾẀẂẄẆẈẊẌẎẐẒẔẖẗẘẙẚẠẢẤẦẨẪẬẮẰẲẴẶẸẺẼẾỀỂỄỆỈỊỌỎỐỒỔỖỘỚỜỞỠỢỤỦỨỪỬỮỰỲỴỶỸ'; |
||
587 | $this->assertEquals($expected, $result); |
||
588 | |||
589 | $input = array(7681, 7683, 7685, 7687, 7689, 7691, 7693, 7695, 7697, 7699, 7701, 7703, 7705, 7707, 7709, 7711, 7713, 7715, |
||
590 | 7717, 7719, 7721, 7723, 7725, 7727, 7729, 7731, 7733, 7735, 7737, 7739, 7741, 7743, 7745, 7747, 7749, 7751, |
||
591 | 7753, 7755, 7757, 7759, 7761, 7763, 7765, 7767, 7769, 7771, 7773, 7775, 7777, 7779, 7781, 7783, 7785, 7787, |
||
592 | 7789, 7791, 7793, 7795, 7797, 7799, 7801, 7803, 7805, 7807, 7809, 7811, 7813, 7815, 7817, 7819, 7821, 7823, |
||
593 | 7825, 7827, 7829, 7830, 7831, 7832, 7833, 7834, 7841, 7843, 7845, 7847, 7849, 7851, 7853, 7855, 7857, 7859, |
||
594 | 7861, 7863, 7865, 7867, 7869, 7871, 7873, 7875, 7877, 7879, 7881, 7883, 7885, 7887, 7889, 7891, 7893, 7895, |
||
595 | 7897, 7899, 7901, 7903, 7905, 7907, 7909, 7911, 7913, 7915, 7917, 7919, 7921, 7923, 7925, 7927, 7929); |
||
596 | $result = Multibyte::ascii($input); |
||
597 | $expected = 'ḁḃḅḇḉḋḍḏḑḓḕḗḙḛḝḟḡḣḥḧḩḫḭḯḱḳḵḷḹḻḽḿṁṃṅṇṉṋṍṏṑṓṕṗṙṛṝṟṡṣṥṧṩṫṭṯṱṳṵṷṹṻṽṿẁẃẅẇẉẋẍẏẑẓẕẖẗẘẙẚạảấầẩẫậắằẳẵặẹẻẽếềểễệỉịọỏốồổỗộớờởỡợụủứừửữựỳỵỷỹ'; |
||
598 | $this->assertEquals($expected, $result); |
||
599 | |||
600 | $input = array(8486, 8490, 8491, 8498); |
||
601 | $result = Multibyte::ascii($input); |
||
602 | $expected = 'ΩKÅℲ'; |
||
603 | $this->assertEquals($expected, $result); |
||
604 | |||
605 | $input = array(969, 107, 229, 8526); |
||
606 | $result = Multibyte::ascii($input); |
||
607 | $expected = 'ωkåⅎ'; |
||
608 | $this->assertEquals($expected, $result); |
||
609 | |||
610 | $input = array(8544, 8545, 8546, 8547, 8548, 8549, 8550, 8551, 8552, 8553, 8554, 8555, 8556, 8557, 8558, 8559, 8579); |
||
611 | $result = Multibyte::ascii($input); |
||
612 | $expected = 'ⅠⅡⅢⅣⅤⅥⅦⅧⅨⅩⅪⅫⅬⅭⅮⅯↃ'; |
||
613 | $this->assertEquals($expected, $result); |
||
614 | |||
615 | $input = array(8560, 8561, 8562, 8563, 8564, 8565, 8566, 8567, 8568, 8569, 8570, 8571, 8572, 8573, 8574, 8575, 8580); |
||
616 | $result = Multibyte::ascii($input); |
||
617 | $expected = 'ⅰⅱⅲⅳⅴⅵⅶⅷⅸⅹⅺⅻⅼⅽⅾⅿↄ'; |
||
618 | $this->assertEquals($expected, $result); |
||
619 | |||
620 | $input = array(9398, 9399, 9400, 9401, 9402, 9403, 9404, 9405, 9406, 9407, 9408, 9409, 9410, 9411, 9412, 9413, 9414, |
||
621 | 9415, 9416, 9417, 9418, 9419, 9420, 9421, 9422, 9423); |
||
622 | $result = Multibyte::ascii($input); |
||
623 | $expected = 'ⒶⒷⒸⒹⒺⒻⒼⒽⒾⒿⓀⓁⓂⓃⓄⓅⓆⓇⓈⓉⓊⓋⓌⓍⓎⓏ'; |
||
624 | $this->assertEquals($expected, $result); |
||
625 | |||
626 | $input = array(9424, 9425, 9426, 9427, 9428, 9429, 9430, 9431, 9432, 9433, 9434, 9435, 9436, 9437, 9438, 9439, 9440, 9441, |
||
627 | 9442, 9443, 9444, 9445, 9446, 9447, 9448, 9449); |
||
628 | $result = Multibyte::ascii($input); |
||
629 | $expected = 'ⓐⓑⓒⓓⓔⓕⓖⓗⓘⓙⓚⓛⓜⓝⓞⓟⓠⓡⓢⓣⓤⓥⓦⓧⓨⓩ'; |
||
630 | $this->assertEquals($expected, $result); |
||
631 | |||
632 | $input = array(11264, 11265, 11266, 11267, 11268, 11269, 11270, 11271, 11272, 11273, 11274, 11275, 11276, 11277, 11278, 11279, |
||
633 | 11280, 11281, 11282, 11283, 11284, 11285, 11286, 11287, 11288, 11289, 11290, 11291, 11292, 11293, 11294, 11295, |
||
634 | 11296, 11297, 11298, 11299, 11300, 11301, 11302, 11303, 11304, 11305, 11306, 11307, 11308, 11309, 11310); |
||
635 | $result = Multibyte::ascii($input); |
||
636 | $expected = 'ⰀⰁⰂⰃⰄⰅⰆⰇⰈⰉⰊⰋⰌⰍⰎⰏⰐⰑⰒⰓⰔⰕⰖⰗⰘⰙⰚⰛⰜⰝⰞⰟⰠⰡⰢⰣⰤⰥⰦⰧⰨⰩⰪⰫⰬⰭⰮ'; |
||
637 | $this->assertEquals($expected, $result); |
||
638 | |||
639 | $input = array(11312, 11313, 11314, 11315, 11316, 11317, 11318, 11319, 11320, 11321, 11322, 11323, 11324, 11325, 11326, 11327, |
||
640 | 11328, 11329, 11330, 11331, 11332, 11333, 11334, 11335, 11336, 11337, 11338, 11339, 11340, 11341, 11342, 11343, |
||
641 | 11344, 11345, 11346, 11347, 11348, 11349, 11350, 11351, 11352, 11353, 11354, 11355, 11356, 11357, 11358); |
||
642 | $result = Multibyte::ascii($input); |
||
643 | $expected = 'ⰰⰱⰲⰳⰴⰵⰶⰷⰸⰹⰺⰻⰼⰽⰾⰿⱀⱁⱂⱃⱄⱅⱆⱇⱈⱉⱊⱋⱌⱍⱎⱏⱐⱑⱒⱓⱔⱕⱖⱗⱘⱙⱚⱛⱜⱝⱞ'; |
||
644 | $this->assertEquals($expected, $result); |
||
645 | |||
646 | $input = array(11392, 11394, 11396, 11398, 11400, 11402, 11404, 11406, 11408, 11410, 11412, 11414, 11416, 11418, 11420, |
||
647 | 11422, 11424, 11426, 11428, 11430, 11432, 11434, 11436, 11438, 11440, 11442, 11444, 11446, 11448, 11450, |
||
648 | 11452, 11454, 11456, 11458, 11460, 11462, 11464, 11466, 11468, 11470, 11472, 11474, 11476, 11478, 11480, |
||
649 | 11482, 11484, 11486, 11488, 11490); |
||
650 | $result = Multibyte::ascii($input); |
||
651 | $expected = 'ⲀⲂⲄⲆⲈⲊⲌⲎⲐⲒⲔⲖⲘⲚⲜⲞⲠⲢⲤⲦⲨⲪⲬⲮⲰⲲⲴⲶⲸⲺⲼⲾⳀⳂⳄⳆⳈⳊⳌⳎⳐⳒⳔⳖⳘⳚⳜⳞⳠⳢ'; |
||
652 | $this->assertEquals($expected, $result); |
||
653 | |||
654 | $input = array(11393, 11395, 11397, 11399, 11401, 11403, 11405, 11407, 11409, 11411, 11413, 11415, 11417, 11419, 11421, 11423, |
||
655 | 11425, 11427, 11429, 11431, 11433, 11435, 11437, 11439, 11441, 11443, 11445, 11447, 11449, 11451, 11453, 11455, |
||
656 | 11457, 11459, 11461, 11463, 11465, 11467, 11469, 11471, 11473, 11475, 11477, 11479, 11481, 11483, 11485, 11487, |
||
657 | 11489, 11491); |
||
658 | $result = Multibyte::ascii($input); |
||
659 | $expected = 'ⲁⲃⲅⲇⲉⲋⲍⲏⲑⲓⲕⲗⲙⲛⲝⲟⲡⲣⲥⲧⲩⲫⲭⲯⲱⲳⲵⲷⲹⲻⲽⲿⳁⳃⳅⳇⳉⳋⳍⳏⳑⳓⳕⳗⳙⳛⳝⳟⳡⳣ'; |
||
660 | $this->assertEquals($expected, $result); |
||
661 | |||
662 | $input = array(64256, 64257, 64258, 64259, 64260, 64261, 64262, 64275, 64276, 64277, 64278, 64279); |
||
663 | $result = Multibyte::ascii($input); |
||
664 | $expected = 'fffiflffifflſtstﬓﬔﬕﬖﬗ'; |
||
665 | $this->assertEquals($expected, $result); |
||
666 | } |
||
667 | |||
668 | /**
|
||
669 | * testUsingMbStripos method
|
||
670 | *
|
||
671 | * @return void
|
||
672 | */
|
||
673 | public function testUsingMbStripos() { |
||
674 | $string = 'ABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789'; |
||
675 | $find = 'f'; |
||
676 | $result = mb_stripos($string, $find); |
||
677 | $expected = 5; |
||
678 | $this->assertEquals($expected, $result); |
||
679 | |||
680 | $string = 'ABCDEFGHIJKLMNOPQFRSTUVWXYZ0123456789'; |
||
681 | $find = 'f'; |
||
682 | $result = mb_stripos($string, $find, 6); |
||
683 | $expected = 17; |
||
684 | $this->assertEquals($expected, $result); |
||
685 | |||
686 | $string = 'ÀÁÂÃÄÅÆÇÈÉÊËÌÍÎÏÐÑÒÓÔÕÖØÙÚÛÜÝÞ'; |
||
687 | $find = 'å'; |
||
688 | $result = mb_stripos($string, $find); |
||
689 | $expected = 5; |
||
690 | $this->assertEquals($expected, $result); |
||
691 | |||
692 | $string = 'ÀÁÂÃÄÅÆÇÈÉÊËÌÍÎÏÐÑÒÓÔÕÖØÅÙÚÛÜÝÞ'; |
||
693 | $find = 'å'; |
||
694 | $result = mb_stripos($string, $find, 6); |
||
695 | $expected = 24; |
||
696 | $this->assertEquals($expected, $result); |
||
697 | |||
698 | $string = 'ĀĂĄĆĈĊČĎĐĒĔĖĘĚĜĞĠĢĤĦĨĪĬĮIJĴĶĹĻĽĿŁŃŅŇŊŌŎŐŒŔŖŘŚŜŞŠŢŤŦŨŪŬŮŰŲŴŶŹŻŽ'; |
||
699 | $find = 'ċ'; |
||
700 | $result = mb_stripos($string, $find); |
||
701 | $expected = 5; |
||
702 | $this->assertEquals($expected, $result); |
||
703 | |||
704 | $string = 'ĀĂĄĆĈĊČĎĐĒĔĖĘĚĜĞĠĢĤĦĨĪĬĮIJĴĶĹĻĽĿŁĊŃŅŇŊŌŎŐŒŔŖŘŚŜŞŠŢŤŦŨŪŬŮŰŲŴŶŹŻŽ'; |
||
705 | $find = 'ċ'; |
||
706 | $result = mb_stripos($string, $find, 6); |
||
707 | $expected = 32; |
||
708 | $this->assertEquals($expected, $result); |
||
709 | |||
710 | $string = '!"#$%&\'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~'; |
||
711 | $find = 'f'; |
||
712 | $result = mb_stripos($string, $find); |
||
713 | $expected = 37; |
||
714 | $this->assertEquals($expected, $result); |
||
715 | |||
716 | $string = '¡¢£¤¥¦§¨©ª«¬®¯°±²³´µ¶·¸¹º»¼½¾¿ÀÁÂÃÄÅÆÇÈ'; |
||
717 | $find = 'Μ'; |
||
718 | $result = mb_stripos($string, $find); |
||
719 | $expected = 20; |
||
720 | $this->assertEquals($expected, $result); |
||
721 | |||
722 | $string = 'ÉÊËÌÍÎÏÐÑÒÓÔÕÖ×ØÙÚÛÜÝÞßàáâãäåæçèéêëìíîïðñòóôõö÷øùúûüýþÿĀāĂ㥹ĆćĈĉĊċČčĎďĐđĒēĔĕĖėĘęĚěĜĝĞğĠġĢģĤĥĦħĨĩĪīĬ'; |
||
723 | $find = 'É'; |
||
724 | $result = mb_stripos($string, $find, 6); |
||
725 | $expected = 32; |
||
726 | $this->assertEquals($expected, $result); |
||
727 | |||
728 | $string = 'ĭĮįİıIJijĴĵĶķĸĹĺĻļĽľĿŀŁłŃńŅņŇňʼnŊŋŌōŎŏŐőŒœŔŕŖŗŘřŚśŜŝŞşŠšŢţŤťŦŧŨũŪūŬŭŮůŰűŲųŴŵŶŷŸŹźŻżŽžſƀƁƂƃƄƅƆƇƈƉƊƋƌƍƎƏƐ'; |
||
729 | $find = 'Ņ'; |
||
730 | $result = mb_stripos($string, $find); |
||
731 | $expected = 24; |
||
732 | $this->assertEquals($expected, $result); |
||
733 | |||
734 | $string = 'ƑƒƓƔƕƖƗƘƙƚƛƜƝƞƟƠơƢƣƤƥƦƧƨƩƪƫƬƭƮƯưƱƲƳƴƵƶƷƸƹƺƻƼƽƾƿǀǁǂǃDŽDždžLJLjljNJNjnjǍǎǏǐǑǒǓǔǕǖǗǘǙǚǛǜǝǞǟǠǡǢǣǤǥǦǧǨǩǪǫǬǭǮǯǰDZDzdzǴ'; |
||
735 | $find = 'Ƹ'; |
||
736 | $result = mb_stripos($string, $find); |
||
737 | $expected = 39; |
||
738 | $this->assertEquals($expected, $result); |
||
739 | |||
740 | $string = 'ƑƒƓƔƕƖƗƘƙƚƛƜƝƞƟƠơƢƣƤƥƦƧƨƩƪƫƬƭƮƯưƱƲƳƴƵƶƷƸƹƺƻƼƽƾƿǀǁǂǃDŽDždžLJLjljNJNjnjǍǎǏǐǑǒǓǔǕǖǗǘǙǚǛǜǝǞǟǠǡǢǣǤǥǦǧǨǩǪǫǬǭǮǯǰDZDzdzǴ'; |
||
741 | $find = 'Ƹ'; |
||
742 | $result = mb_stripos($string, $find, 40); |
||
743 | $expected = 40; |
||
744 | $this->assertEquals($expected, $result); |
||
745 | |||
746 | $string = 'əɚɛɜɝɞɟɠɡɢɣɤɥɦɧɨɩɪɫɬɭɮɯɰɱɲɳɴɵɶɷɸɹɺɻɼɽɾɿʀʁʂʃʄʅʆʇʈʉʊʋʌʍʎʏʐʑʒʓʔʕʖʗʘʙʚʛʜʝʞʟʠʡʢʣʤʥʦʧʨʩʪʫʬʭʮʯʰʱʲʳʴʵʶʷʸʹʺʻʼ'; |
||
747 | $find = 'Ʀ'; |
||
748 | $result = mb_stripos($string, $find); |
||
749 | $expected = 39; |
||
750 | $this->assertEquals($expected, $result); |
||
751 | |||
752 | $string = 'ЀЁЂЃЄЅІЇЈЉЊЋЌЍЎЏАБВГДЕЖЗИЙКЛ'; |
||
753 | $find = 'ї'; |
||
754 | $result = mb_stripos($string, $find); |
||
755 | $expected = 7; |
||
756 | $this->assertEquals($expected, $result); |
||
757 | |||
758 | $string = 'МНОПРСТУФХЦЧШЩЪЫЬЭЮЯабвгдежзийклмнопрстуфхцчшщъыь'; |
||
759 | $find = 'Р'; |
||
760 | $result = mb_stripos($string, $find); |
||
761 | $expected = 4; |
||
762 | $this->assertEquals($expected, $result); |
||
763 | |||
764 | $string = 'МНОПРСТУФХЦЧШЩЪЫЬЭЮЯабвгдежзийклмнопрстуфхцчшщъыь'; |
||
765 | $find = 'Р'; |
||
766 | $result = mb_stripos($string, $find, 5); |
||
767 | $expected = 36; |
||
768 | $this->assertEquals($expected, $result); |
||
769 | |||
770 | $string = 'فقكلمنهوىيًٌٍَُ'; |
||
771 | $find = 'ن'; |
||
772 | $result = mb_stripos($string, $find); |
||
773 | $expected = 5; |
||
774 | $this->assertEquals($expected, $result); |
||
775 | |||
776 | $string = '✰✱✲✳✴✵✶✷✸✹✺✻✼✽✾✿❀❁❂❃❄❅❆❇❈❉❊❋❌❍❎❏❐❑❒❓❔❕❖❗❘❙❚❛❜❝❞'; |
||
777 | $find = '✿'; |
||
778 | $result = mb_stripos($string, $find); |
||
779 | $expected = 15; |
||
780 | $this->assertEquals($expected, $result); |
||
781 | |||
782 | $string = '⺀⺁⺂⺃⺄⺅⺆⺇⺈⺉⺊⺋⺌⺍⺎⺏⺐⺑⺒⺓⺔⺕⺖⺗⺘⺙⺛⺜⺝⺞⺟⺠⺡⺢⺣⺤⺥⺦⺧⺨⺩⺪⺫⺬⺭⺮⺯⺰⺱⺲⺳⺴⺵⺶⺷⺸⺹⺺⺻⺼⺽⺾⺿⻀⻁⻂⻃⻄⻅⻆⻇⻈⻉⻊⻋⻌⻍⻎⻏⻐⻑⻒⻓⻔⻕⻖⻗⻘⻙⻚⻛⻜⻝⻞⻟⻠'; |
||
783 | $find = '⺐'; |
||
784 | $result = mb_stripos($string, $find); |
||
785 | $expected = 16; |
||
786 | $this->assertEquals($expected, $result); |
||
787 | |||
788 | $string = '⽅⽆⽇⽈⽉⽊⽋⽌⽍⽎⽏⽐⽑⽒⽓⽔⽕⽖⽗⽘⽙⽚⽛⽜⽝⽞⽟⽠⽡⽢⽣⽤⽥⽦⽧⽨⽩⽪⽫⽬⽭⽮⽯⽰⽱⽲⽳⽴⽵⽶⽷⽸⽹⽺⽻⽼⽽⽾⽿'; |
||
789 | $find = '⽤'; |
||
790 | $result = mb_stripos($string, $find); |
||
791 | $expected = 31; |
||
792 | $this->assertEquals($expected, $result); |
||
793 | |||
794 | $string = '눡눢눣눤눥눦눧눨눩눪눫눬눭눮눯눰눱눲눳눴눵눶눷눸눹눺눻눼눽눾눿뉀뉁뉂뉃뉄뉅뉆뉇뉈뉉뉊뉋뉌뉍뉎뉏뉐뉑뉒뉓뉔뉕뉖뉗뉘뉙뉚뉛뉜뉝뉞뉟뉠뉡뉢뉣뉤뉥뉦뉧뉨뉩뉪뉫뉬뉭뉮뉯뉰뉱뉲뉳뉴뉵뉶뉷뉸뉹뉺뉻뉼뉽뉾뉿늀늁늂늃늄'; |
||
795 | $find = '눻'; |
||
796 | $result = mb_stripos($string, $find); |
||
797 | $expected = 26; |
||
798 | $this->assertEquals($expected, $result); |
||
799 | |||
800 | $string = 'ﹰﹱﹲﹳﹴﹶﹷﹸﹹﹺﹻﹼﹽﹾﹿﺀﺁﺂﺃﺄﺅﺆﺇﺈﺉﺊﺋﺌﺍﺎﺏﺐﺑﺒﺓﺔﺕﺖﺗﺘﺙﺚﺛﺜﺝﺞﺟﺠﺡﺢﺣﺤﺥﺦﺧﺨﺩﺪﺫﺬﺭﺮﺯﺰ'; |
||
801 | $find = 'ﺞ'; |
||
802 | $result = mb_stripos($string, $find); |
||
803 | $expected = 46; |
||
804 | $this->assertEquals($expected, $result); |
||
805 | |||
806 | $string = 'ﺱﺲﺳﺴﺵﺶﺷﺸﺹﺺﺻﺼﺽﺾﺿﻀﻁﻂﻃﻄﻅﻆﻇﻈﻉﻊﻋﻌﻍﻎﻏﻐﻑﻒﻓﻔﻕﻖﻗﻘﻙﻚﻛﻜﻝﻞﻟﻠﻡﻢﻣﻤﻥﻦﻧﻨﻩﻪﻫﻬﻭﻮﻯﻰﻱﻲﻳﻴﻵﻶﻷﻸﻹﻺﻻﻼ'; |
||
807 | $find = 'ﻞ'; |
||
808 | $result = mb_stripos($string, $find); |
||
809 | $expected = 45; |
||
810 | $this->assertEquals($expected, $result); |
||
811 | |||
812 | $string = 'abcdefghijklmnopqrstuvwxyz'; |
||
813 | $find = 'k'; |
||
814 | $result = mb_stripos($string, $find); |
||
815 | $expected = 10; |
||
816 | $this->assertEquals($expected, $result); |
||
817 | |||
818 | $string = 'abcdefghijklmnopqrstuvwxyz'; |
||
819 | $find = 'K'; |
||
820 | $result = mb_stripos($string, $find); |
||
821 | $expected = 10; |
||
822 | $this->assertEquals($expected, $result); |
||
823 | |||
824 | $string = '。「」、・ヲァィゥェォャュョッーアイウエオカキク'; |
||
825 | $find = 'ア'; |
||
826 | $result = mb_stripos($string, $find); |
||
827 | $expected = 16; |
||
828 | $this->assertEquals($expected, $result); |
||
829 | |||
830 | $string = 'ケコサシスセソタチツテトナニヌネノハヒフヘホマミムメモヤユヨラリルレロワン゙'; |
||
831 | $find = 'ハ'; |
||
832 | $result = mb_stripos($string, $find); |
||
833 | $expected = 17; |
||
834 | $this->assertEquals($expected, $result); |
||
835 | |||
836 | $string = 'Ĥēĺļŏ, Ŵőřļď!'; |
||
837 | $find = 'ő'; |
||
838 | $result = mb_stripos($string, $find); |
||
839 | $expected = 8; |
||
840 | $this->assertEquals($expected, $result); |
||
841 | |||
842 | $string = 'Ĥēĺļŏ, Ŵőřļď!'; |
||
843 | $find = 'Ő'; |
||
844 | $result = mb_stripos($string, $find); |
||
845 | $expected = 8; |
||
846 | $this->assertEquals($expected, $result); |
||
847 | |||
848 | $string = 'Hello, World!'; |
||
849 | $find = 'O'; |
||
850 | $result = mb_stripos($string, $find); |
||
851 | $expected = 4; |
||
852 | $this->assertEquals($expected, $result); |
||
853 | |||
854 | $string = 'Hello, World!'; |
||
855 | $find = 'o'; |
||
856 | $result = mb_stripos($string, $find); |
||
857 | $expected = 4; |
||
858 | $this->assertEquals($expected, $result); |
||
859 | |||
860 | $string = 'čini'; |
||
861 | $find = 'n'; |
||
862 | $result = mb_stripos($string, $find); |
||
863 | $expected = 2; |
||
864 | $this->assertEquals($expected, $result); |
||
865 | |||
866 | $string = 'čini'; |
||
867 | $find = 'N'; |
||
868 | $result = mb_stripos($string, $find); |
||
869 | $expected = 2; |
||
870 | $this->assertEquals($expected, $result); |
||
871 | |||
872 | $string = 'moći'; |
||
873 | $find = 'ć'; |
||
874 | $result = mb_stripos($string, $find); |
||
875 | $expected = 2; |
||
876 | $this->assertEquals($expected, $result); |
||
877 | |||
878 | $string = 'moći'; |
||
879 | $find = 'Ć'; |
||
880 | $result = mb_stripos($string, $find); |
||
881 | $expected = 2; |
||
882 | $this->assertEquals($expected, $result); |
||
883 | |||
884 | $string = 'državni'; |
||
885 | $find = 'ž'; |
||
886 | $result = mb_stripos($string, $find); |
||
887 | $expected = 2; |
||
888 | $this->assertEquals($expected, $result); |
||
889 | |||
890 | $string = 'državni'; |
||
891 | $find = 'Ž'; |
||
892 | $result = mb_stripos($string, $find); |
||
893 | $expected = 2; |
||
894 | $this->assertEquals($expected, $result); |
||
895 | |||
896 | $string = '把百度设为首页'; |
||
897 | $find = '设'; |
||
898 | $result = mb_stripos($string, $find); |
||
899 | $expected = 3; |
||
900 | $this->assertEquals($expected, $result); |
||
901 | |||
902 | $string = '一二三周永龍'; |
||
903 | $find = '周'; |
||
904 | $result = mb_stripos($string, $find); |
||
905 | $expected = 3; |
||
906 | $this->assertEquals($expected, $result); |
||
907 | |||
908 | $string = 'državni'; |
||
909 | $find = 'DŽ'; |
||
910 | $result = mb_stripos($string, $find); |
||
911 | $expected = false; |
||
912 | $this->assertEquals($expected, $result); |
||
913 | } |
||
914 | |||
915 | /**
|
||
916 | * testMultibyteStripos method
|
||
917 | *
|
||
918 | * @return void
|
||
919 | */
|
||
920 | public function testMultibyteStripos() { |
||
921 | $string = 'ABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789'; |
||
922 | $find = 'f'; |
||
923 | $result = Multibyte::stripos($string, $find); |
||
924 | $expected = 5; |
||
925 | $this->assertEquals($expected, $result); |
||
926 | |||
927 | $string = 'ABCDEFGHIJKLMNOPQFRSTUVWXYZ0123456789'; |
||
928 | $find = 'f'; |
||
929 | $result = Multibyte::stripos($string, $find, 6); |
||
930 | $expected = 17; |
||
931 | $this->assertEquals($expected, $result); |
||
932 | |||
933 | $string = 'ÀÁÂÃÄÅÆÇÈÉÊËÌÍÎÏÐÑÒÓÔÕÖØÙÚÛÜÝÞ'; |
||
934 | $find = 'å'; |
||
935 | $result = Multibyte::stripos($string, $find); |
||
936 | $expected = 5; |
||
937 | $this->assertEquals($expected, $result); |
||
938 | |||
939 | $string = 'ÀÁÂÃÄÅÆÇÈÉÊËÌÍÎÏÐÑÒÓÔÕÖØÅÙÚÛÜÝÞ'; |
||
940 | $find = 'å'; |
||
941 | $result = Multibyte::stripos($string, $find, 6); |
||
942 | $expected = 24; |
||
943 | $this->assertEquals($expected, $result); |
||
944 | |||
945 | $string = 'ĀĂĄĆĈĊČĎĐĒĔĖĘĚĜĞĠĢĤĦĨĪĬĮIJĴĶĹĻĽĿŁŃŅŇŊŌŎŐŒŔŖŘŚŜŞŠŢŤŦŨŪŬŮŰŲŴŶŹŻŽ'; |
||
946 | $find = 'ċ'; |
||
947 | $result = Multibyte::stripos($string, $find); |
||
948 | $expected = 5; |
||
949 | $this->assertEquals($expected, $result); |
||
950 | |||
951 | $string = 'ĀĂĄĆĈĊČĎĐĒĔĖĘĚĜĞĠĢĤĦĨĪĬĮIJĴĶĹĻĽĿŁĊŃŅŇŊŌŎŐŒŔŖŘŚŜŞŠŢŤŦŨŪŬŮŰŲŴŶŹŻŽ'; |
||
952 | $find = 'ċ'; |
||
953 | $result = Multibyte::stripos($string, $find, 6); |
||
954 | $expected = 32; |
||
955 | $this->assertEquals($expected, $result); |
||
956 | |||
957 | $string = '!"#$%&\'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~'; |
||
958 | $find = 'f'; |
||
959 | $result = Multibyte::stripos($string, $find); |
||
960 | $expected = 37; |
||
961 | $this->assertEquals($expected, $result); |
||
962 | |||
963 | $string = '¡¢£¤¥¦§¨©ª«¬®¯°±²³´µ¶·¸¹º»¼½¾¿ÀÁÂÃÄÅÆÇÈ'; |
||
964 | $find = 'Μ'; |
||
965 | $result = Multibyte::stripos($string, $find); |
||
966 | $expected = 20; |
||
967 | $this->assertEquals($expected, $result); |
||
968 | |||
969 | $string = 'ÉÊËÌÍÎÏÐÑÒÓÔÕÖ×ØÙÚÛÜÝÞßàáâãäåæçèéêëìíîïðñòóôõö÷øùúûüýþÿĀāĂ㥹ĆćĈĉĊċČčĎďĐđĒēĔĕĖėĘęĚěĜĝĞğĠġĢģĤĥĦħĨĩĪīĬ'; |
||
970 | $find = 'É'; |
||
971 | $result = Multibyte::stripos($string, $find, 6); |
||
972 | $expected = 32; |
||
973 | $this->assertEquals($expected, $result); |
||
974 | |||
975 | $string = 'ĭĮįİıIJijĴĵĶķĸĹĺĻļĽľĿŀŁłŃńŅņŇňʼnŊŋŌōŎŏŐőŒœŔŕŖŗŘřŚśŜŝŞşŠšŢţŤťŦŧŨũŪūŬŭŮůŰűŲųŴŵŶŷŸŹźŻżŽžſƀƁƂƃƄƅƆƇƈƉƊƋƌƍƎƏƐ'; |
||
976 | $find = 'Ņ'; |
||
977 | $result = Multibyte::stripos($string, $find); |
||
978 | $expected = 24; |
||
979 | $this->assertEquals($expected, $result); |
||
980 | |||
981 | $string = 'ƑƒƓƔƕƖƗƘƙƚƛƜƝƞƟƠơƢƣƤƥƦƧƨƩƪƫƬƭƮƯưƱƲƳƴƵƶƷƸƹƺƻƼƽƾƿǀǁǂǃDŽDždžLJLjljNJNjnjǍǎǏǐǑǒǓǔǕǖǗǘǙǚǛǜǝǞǟǠǡǢǣǤǥǦǧǨǩǪǫǬǭǮǯǰDZDzdzǴ'; |
||
982 | $find = 'Ƹ'; |
||
983 | $result = Multibyte::stripos($string, $find); |
||
984 | $expected = 39; |
||
985 | $this->assertEquals($expected, $result); |
||
986 | |||
987 | $string = 'ƑƒƓƔƕƖƗƘƙƚƛƜƝƞƟƠơƢƣƤƥƦƧƨƩƪƫƬƭƮƯưƱƲƳƴƵƶƷƸƹƺƻƼƽƾƿǀǁǂǃDŽDždžLJLjljNJNjnjǍǎǏǐǑǒǓǔǕǖǗǘǙǚǛǜǝǞǟǠǡǢǣǤǥǦǧǨǩǪǫǬǭǮǯǰDZDzdzǴ'; |
||
988 | $find = 'Ƹ'; |
||
989 | $result = Multibyte::stripos($string, $find, 40); |
||
990 | $expected = 40; |
||
991 | $this->assertEquals($expected, $result); |
||
992 | |||
993 | $string = 'əɚɛɜɝɞɟɠɡɢɣɤɥɦɧɨɩɪɫɬɭɮɯɰɱɲɳɴɵɶɷɸɹɺɻɼɽɾɿʀʁʂʃʄʅʆʇʈʉʊʋʌʍʎʏʐʑʒʓʔʕʖʗʘʙʚʛʜʝʞʟʠʡʢʣʤʥʦʧʨʩʪʫʬʭʮʯʰʱʲʳʴʵʶʷʸʹʺʻʼ'; |
||
994 | $find = 'Ʀ'; |
||
995 | $result = Multibyte::stripos($string, $find); |
||
996 | $expected = 39; |
||
997 | $this->assertEquals($expected, $result); |
||
998 | |||
999 | $string = 'ЀЁЂЃЄЅІЇЈЉЊЋЌЍЎЏАБВГДЕЖЗИЙКЛ'; |
||
1000 | $find = 'ї'; |
||
1001 | $result = Multibyte::stripos($string, $find); |
||
1002 | $expected = 7; |
||
1003 | $this->assertEquals($expected, $result); |
||
1004 | |||
1005 | $string = 'МНОПРСТУФХЦЧШЩЪЫЬЭЮЯабвгдежзийклмнопрстуфхцчшщъыь'; |
||
1006 | $find = 'Р'; |
||
1007 | $result = Multibyte::stripos($string, $find); |
||
1008 | $expected = 4; |
||
1009 | $this->assertEquals($expected, $result); |
||
1010 | |||
1011 | $string = 'МНОПРСТУФХЦЧШЩЪЫЬЭЮЯабвгдежзийклмнопрстуфхцчшщъыь'; |
||
1012 | $find = 'Р'; |
||
1013 | $result = Multibyte::stripos($string, $find, 5); |
||
1014 | $expected = 36; |
||
1015 | $this->assertEquals($expected, $result); |
||
1016 | |||
1017 | $string = 'فقكلمنهوىيًٌٍَُ'; |
||
1018 | $find = 'ن'; |
||
1019 | $result = Multibyte::stripos($string, $find); |
||
1020 | $expected = 5; |
||
1021 | $this->assertEquals($expected, $result); |
||
1022 | |||
1023 | $string = '✰✱✲✳✴✵✶✷✸✹✺✻✼✽✾✿❀❁❂❃❄❅❆❇❈❉❊❋❌❍❎❏❐❑❒❓❔❕❖❗❘❙❚❛❜❝❞'; |
||
1024 | $find = '✿'; |
||
1025 | $result = Multibyte::stripos($string, $find); |
||
1026 | $expected = 15; |
||
1027 | $this->assertEquals($expected, $result); |
||
1028 | |||
1029 | $string = '⺀⺁⺂⺃⺄⺅⺆⺇⺈⺉⺊⺋⺌⺍⺎⺏⺐⺑⺒⺓⺔⺕⺖⺗⺘⺙⺛⺜⺝⺞⺟⺠⺡⺢⺣⺤⺥⺦⺧⺨⺩⺪⺫⺬⺭⺮⺯⺰⺱⺲⺳⺴⺵⺶⺷⺸⺹⺺⺻⺼⺽⺾⺿⻀⻁⻂⻃⻄⻅⻆⻇⻈⻉⻊⻋⻌⻍⻎⻏⻐⻑⻒⻓⻔⻕⻖⻗⻘⻙⻚⻛⻜⻝⻞⻟⻠'; |
||
1030 | $find = '⺐'; |
||
1031 | $result = Multibyte::stripos($string, $find); |
||
1032 | $expected = 16; |
||
1033 | $this->assertEquals($expected, $result); |
||
1034 | |||
1035 | $string = '⽅⽆⽇⽈⽉⽊⽋⽌⽍⽎⽏⽐⽑⽒⽓⽔⽕⽖⽗⽘⽙⽚⽛⽜⽝⽞⽟⽠⽡⽢⽣⽤⽥⽦⽧⽨⽩⽪⽫⽬⽭⽮⽯⽰⽱⽲⽳⽴⽵⽶⽷⽸⽹⽺⽻⽼⽽⽾⽿'; |
||
1036 | $find = '⽤'; |
||
1037 | $result = Multibyte::stripos($string, $find); |
||
1038 | $expected = 31; |
||
1039 | $this->assertEquals($expected, $result); |
||
1040 | |||
1041 | $string = '눡눢눣눤눥눦눧눨눩눪눫눬눭눮눯눰눱눲눳눴눵눶눷눸눹눺눻눼눽눾눿뉀뉁뉂뉃뉄뉅뉆뉇뉈뉉뉊뉋뉌뉍뉎뉏뉐뉑뉒뉓뉔뉕뉖뉗뉘뉙뉚뉛뉜뉝뉞뉟뉠뉡뉢뉣뉤뉥뉦뉧뉨뉩뉪뉫뉬뉭뉮뉯뉰뉱뉲뉳뉴뉵뉶뉷뉸뉹뉺뉻뉼뉽뉾뉿늀늁늂늃늄'; |
||
1042 | $find = '눻'; |
||
1043 | $result = Multibyte::stripos($string, $find); |
||
1044 | $expected = 26; |
||
1045 | $this->assertEquals($expected, $result); |
||
1046 | |||
1047 | $string = 'ﹰﹱﹲﹳﹴﹶﹷﹸﹹﹺﹻﹼﹽﹾﹿﺀﺁﺂﺃﺄﺅﺆﺇﺈﺉﺊﺋﺌﺍﺎﺏﺐﺑﺒﺓﺔﺕﺖﺗﺘﺙﺚﺛﺜﺝﺞﺟﺠﺡﺢﺣﺤﺥﺦﺧﺨﺩﺪﺫﺬﺭﺮﺯﺰ'; |
||
1048 | $find = 'ﺞ'; |
||
1049 | $result = Multibyte::stripos($string, $find); |
||
1050 | $expected = 46; |
||
1051 | $this->assertEquals($expected, $result); |
||
1052 | |||
1053 | $string = 'ﺱﺲﺳﺴﺵﺶﺷﺸﺹﺺﺻﺼﺽﺾﺿﻀﻁﻂﻃﻄﻅﻆﻇﻈﻉﻊﻋﻌﻍﻎﻏﻐﻑﻒﻓﻔﻕﻖﻗﻘﻙﻚﻛﻜﻝﻞﻟﻠﻡﻢﻣﻤﻥﻦﻧﻨﻩﻪﻫﻬﻭﻮﻯﻰﻱﻲﻳﻴﻵﻶﻷﻸﻹﻺﻻﻼ'; |
||
1054 | $find = 'ﻞ'; |
||
1055 | $result = Multibyte::stripos($string, $find); |
||
1056 | $expected = 45; |
||
1057 | $this->assertEquals($expected, $result); |
||
1058 | |||
1059 | $string = 'abcdefghijklmnopqrstuvwxyz'; |
||
1060 | $find = 'k'; |
||
1061 | $result = Multibyte::stripos($string, $find); |
||
1062 | $expected = 10; |
||
1063 | $this->assertEquals($expected, $result); |
||
1064 | |||
1065 | $string = 'abcdefghijklmnopqrstuvwxyz'; |
||
1066 | $find = 'K'; |
||
1067 | $result = Multibyte::stripos($string, $find); |
||
1068 | $expected = 10; |
||
1069 | $this->assertEquals($expected, $result); |
||
1070 | |||
1071 | $string = '。「」、・ヲァィゥェォャュョッーアイウエオカキク'; |
||
1072 | $find = 'ア'; |
||
1073 | $result = Multibyte::stripos($string, $find); |
||
1074 | $expected = 16; |
||
1075 | $this->assertEquals($expected, $result); |
||
1076 | |||
1077 | $string = 'ケコサシスセソタチツテトナニヌネノハヒフヘホマミムメモヤユヨラリルレロワン゙'; |
||
1078 | $find = 'ハ'; |
||
1079 | $result = Multibyte::stripos($string, $find); |
||
1080 | $expected = 17; |
||
1081 | $this->assertEquals($expected, $result); |
||
1082 | |||
1083 | $string = 'Ĥēĺļŏ, Ŵőřļď!'; |
||
1084 | $find = 'ő'; |
||
1085 | $result = Multibyte::stripos($string, $find); |
||
1086 | $expected = 8; |
||
1087 | $this->assertEquals($expected, $result); |
||
1088 | |||
1089 | $string = 'Ĥēĺļŏ, Ŵőřļď!'; |
||
1090 | $find = 'Ő'; |
||
1091 | $result = Multibyte::stripos($string, $find); |
||
1092 | $expected = 8; |
||
1093 | $this->assertEquals($expected, $result); |
||
1094 | |||
1095 | $string = 'Hello, World!'; |
||
1096 | $find = 'O'; |
||
1097 | $result = Multibyte::stripos($string, $find); |
||
1098 | $expected = 4; |
||
1099 | $this->assertEquals($expected, $result); |
||
1100 | |||
1101 | $string = 'Hello, World!'; |
||
1102 | $find = 'o'; |
||
1103 | $result = Multibyte::stripos($string, $find); |
||
1104 | $expected = 4; |
||
1105 | $this->assertEquals($expected, $result); |
||
1106 | |||
1107 | $string = 'čini'; |
||
1108 | $find = 'n'; |
||
1109 | $result = Multibyte::stripos($string, $find); |
||
1110 | $expected = 2; |
||
1111 | $this->assertEquals($expected, $result); |
||
1112 | |||
1113 | $string = 'čini'; |
||
1114 | $find = 'N'; |
||
1115 | $result = Multibyte::stripos($string, $find); |
||
1116 | $expected = 2; |
||
1117 | $this->assertEquals($expected, $result); |
||
1118 | |||
1119 | $string = 'moći'; |
||
1120 | $find = 'ć'; |
||
1121 | $result = Multibyte::stripos($string, $find); |
||
1122 | $expected = 2; |
||
1123 | $this->assertEquals($expected, $result); |
||
1124 | |||
1125 | $string = 'moći'; |
||
1126 | $find = 'Ć'; |
||
1127 | $result = Multibyte::stripos($string, $find); |
||
1128 | $expected = 2; |
||
1129 | $this->assertEquals($expected, $result); |
||
1130 | |||
1131 | $string = 'državni'; |
||
1132 | $find = 'ž'; |
||
1133 | $result = Multibyte::stripos($string, $find); |
||
1134 | $expected = 2; |
||
1135 | $this->assertEquals($expected, $result); |
||
1136 | |||
1137 | $string = 'državni'; |
||
1138 | $find = 'Ž'; |
||
1139 | $result = Multibyte::stripos($string, $find); |
||
1140 | $expected = 2; |
||
1141 | $this->assertEquals($expected, $result); |
||
1142 | |||
1143 | $string = '把百度设为首页'; |
||
1144 | $find = '设'; |
||
1145 | $result = Multibyte::stripos($string, $find); |
||
1146 | $expected = 3; |
||
1147 | $this->assertEquals($expected, $result); |
||
1148 | |||
1149 | $string = '一二三周永龍'; |
||
1150 | $find = '周'; |
||
1151 | $result = Multibyte::stripos($string, $find); |
||
1152 | $expected = 3; |
||
1153 | $this->assertEquals($expected, $result); |
||
1154 | |||
1155 | $string = 'državni'; |
||
1156 | $find = 'DŽ'; |
||
1157 | $result = Multibyte::stripos($string, $find); |
||
1158 | $expected = false; |
||
1159 | $this->assertEquals($expected, $result); |
||
1160 | } |
||
1161 | |||
1162 | /**
|
||
1163 | * testUsingMbStristr method
|
||
1164 | *
|
||
1165 | * @return void
|
||
1166 | */
|
||
1167 | public function testUsingMbStristr() { |
||
1168 | $string = 'ABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789'; |
||
1169 | $find = 'f'; |
||
1170 | $result = mb_stristr($string, $find); |
||
1171 | $expected = 'FGHIJKLMNOPQRSTUVWXYZ0123456789'; |
||
1172 | $this->assertEquals($expected, $result); |
||
1173 | |||
1174 | $string = 'ABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789'; |
||
1175 | $find = 'f'; |
||
1176 | $result = mb_stristr($string, $find, true); |
||
1177 | $expected = 'ABCDE'; |
||
1178 | $this->assertEquals($expected, $result); |
||
1179 | |||
1180 | $string = 'ÀÁÂÃÄÅÆÇÈÉÊËÌÍÎÏÐÑÒÓÔÕÖØÙÚÛÜÝÞ'; |
||
1181 | $find = 'å'; |
||
1182 | $result = mb_stristr($string, $find); |
||
1183 | $expected = 'ÅÆÇÈÉÊËÌÍÎÏÐÑÒÓÔÕÖØÙÚÛÜÝÞ'; |
||
1184 | $this->assertEquals($expected, $result); |
||
1185 | |||
1186 | $string = 'ÀÁÂÃÄÅÆÇÈÉÊËÌÍÎÏÐÑÒÓÔÕÖØÙÚÛÜÝÞ'; |
||
1187 | $find = 'å'; |
||
1188 | $result = mb_stristr($string, $find, true); |
||
1189 | $expected = 'ÀÁÂÃÄ'; |
||
1190 | $this->assertEquals($expected, $result); |
||
1191 | |||
1192 | $string = 'ĀĂĄĆĈĊČĎĐĒĔĖĘĚĜĞĠĢĤĦĨĪĬĮIJĴĶĹĻĽĿŁŃŅŇŊŌŎŐŒŔŖŘŚŜŞŠŢŤŦŨŪŬŮŰŲŴŶŹŻŽ'; |
||
1193 | $find = 'ċ'; |
||
1194 | $result = mb_stristr($string, $find); |
||
1195 | $expected = 'ĊČĎĐĒĔĖĘĚĜĞĠĢĤĦĨĪĬĮIJĴĶĹĻĽĿŁŃŅŇŊŌŎŐŒŔŖŘŚŜŞŠŢŤŦŨŪŬŮŰŲŴŶŹŻŽ'; |
||
1196 | $this->assertEquals($expected, $result); |
||
1197 | |||
1198 | $string = 'ĀĂĄĆĈĊČĎĐĒĔĖĘĚĜĞĠĢĤĦĨĪĬĮIJĴĶĹĻĽĿŁŃŅŇŊŌŎŐŒŔŖŘŚŜŞŠŢŤŦŨŪŬŮŰŲŴŶŹŻŽ'; |
||
1199 | $find = 'ċ'; |
||
1200 | $result = mb_stristr($string, $find, true); |
||
1201 | $expected = 'ĀĂĄĆĈ'; |
||
1202 | $this->assertEquals($expected, $result); |
||
1203 | |||
1204 | $string = '!"#$%&\'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~'; |
||
1205 | $find = 'f'; |
||
1206 | $result = mb_stristr($string, $find); |
||
1207 | $expected = 'FGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~'; |
||
1208 | $this->assertEquals($expected, $result); |
||
1209 | |||
1210 | $string = '!"#$%&\'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~'; |
||
1211 | $find = 'f'; |
||
1212 | $result = mb_stristr($string, $find, true); |
||
1213 | $expected = '!"#$%&\'()*+,-./0123456789:;<=>?@ABCDE'; |
||
1214 | $this->assertEquals($expected, $result); |
||
1215 | |||
1216 | $string = '¡¢£¤¥¦§¨©ª«¬®¯°±²³´µ¶·¸¹º»¼½¾¿ÀÁÂÃÄÅÆÇÈ'; |
||
1217 | $find = 'Μ'; |
||
1218 | $result = mb_stristr($string, $find); |
||
1219 | $expected = 'µ¶·¸¹º»¼½¾¿ÀÁÂÃÄÅÆÇÈ'; |
||
1220 | $this->assertEquals($expected, $result); |
||
1221 | |||
1222 | $string = '¡¢£¤¥¦§¨©ª«¬®¯°±²³´µ¶·¸¹º»¼½¾¿ÀÁÂÃÄÅÆÇÈ'; |
||
1223 | $find = 'Μ'; |
||
1224 | $result = mb_stristr($string, $find, true); |
||
1225 | $expected = '¡¢£¤¥¦§¨©ª«¬®¯°±²³´'; |
||
1226 | $this->assertEquals($expected, $result); |
||
1227 | |||
1228 | $string = 'ÉÊËÌÍÎÏÐÑÒÓÔÕÖ×ØÙÚÛÜÝÞßàáâãäåæçèéêëìíîïðñòóôõö÷øùúûüýþÿĀāĂ㥹ĆćĈĉĊċČčĎďĐđĒēĔĕĖėĘęĚěĜĝĞğĠġĢģĤĥĦħĨĩĪīĬ'; |
||
1229 | $find = 'þ'; |
||
1230 | $result = mb_stristr($string, $find); |
||
1231 | $expected = 'Þßàáâãäåæçèéêëìíîïðñòóôõö÷øùúûüýþÿĀāĂ㥹ĆćĈĉĊċČčĎďĐđĒēĔĕĖėĘęĚěĜĝĞğĠġĢģĤĥĦħĨĩĪīĬ'; |
||
1232 | $this->assertEquals($expected, $result); |
||
1233 | |||
1234 | $string = 'ÉÊËÌÍÎÏÐÑÒÓÔÕÖ×ØÙÚÛÜÝÞßàáâãäåæçèéêëìíîïðñòóôõö÷øùúûüýþÿĀāĂ㥹ĆćĈĉĊċČčĎďĐđĒēĔĕĖėĘęĚěĜĝĞğĠġĢģĤĥĦħĨĩĪīĬ'; |
||
1235 | $find = 'þ'; |
||
1236 | $result = mb_stristr($string, $find, true); |
||
1237 | $expected = 'ÉÊËÌÍÎÏÐÑÒÓÔÕÖ×ØÙÚÛÜÝ'; |
||
1238 | $this->assertEquals($expected, $result); |
||
1239 | |||
1240 | $string = 'ĭĮįİıIJijĴĵĶķĸĹĺĻļĽľĿŀŁłŃńŅņŇňʼnŊŋŌōŎŏŐőŒœŔŕŖŗŘřŚśŜŝŞşŠšŢţŤťŦŧŨũŪūŬŭŮůŰűŲųŴŵŶŷŸŹźŻżŽžſƀƁƂƃƄƅƆƇƈƉƊƋƌƍƎƏƐ'; |
||
1241 | $find = 'Ņ'; |
||
1242 | $result = mb_stristr($string, $find); |
||
1243 | $expected = 'ŅņŇňʼnŊŋŌōŎŏŐőŒœŔŕŖŗŘřŚśŜŝŞşŠšŢţŤťŦŧŨũŪūŬŭŮůŰűŲųŴŵŶŷŸŹźŻżŽžſƀƁƂƃƄƅƆƇƈƉƊƋƌƍƎƏƐ'; |
||
1244 | $this->assertEquals($expected, $result); |
||
1245 | |||
1246 | $string = 'ĭĮįİıIJijĴĵĶķĸĹĺĻļĽľĿŀŁłŃńŅņŇňʼnŊŋŌōŎŏŐőŒœŔŕŖŗŘřŚśŜŝŞşŠšŢţŤťŦŧŨũŪūŬŭŮůŰűŲųŴŵŶŷŸŹźŻżŽžſƀƁƂƃƄƅƆƇƈƉƊƋƌƍƎƏƐ'; |
||
1247 | $find = 'Ņ'; |
||
1248 | $result = mb_stristr($string, $find, true); |
||
1249 | $expected = 'ĭĮįİıIJijĴĵĶķĸĹĺĻļĽľĿŀŁłŃń'; |
||
1250 | $this->assertEquals($expected, $result); |
||
1251 | |||
1252 | $string = 'ƑƒƓƔƕƖƗƘƙƚƛƜƝƞƟƠơƢƣƤƥƦƧƨƩƪƫƬƭƮƯưƱƲƳƴƵƶƷƸƹƺƻƼƽƾƿǀǁǂǃDŽDždžLJLjljNJNjnjǍǎǏǐǑǒǓǔǕǖǗǘǙǚǛǜǝǞǟǠǡǢǣǤǥǦǧǨǩǪǫǬǭǮǯǰDZDzdzǴ'; |
||
1253 | $find = 'Ƹ'; |
||
1254 | $result = mb_stristr($string, $find); |
||
1255 | $expected = 'ƸƹƺƻƼƽƾƿǀǁǂǃDŽDždžLJLjljNJNjnjǍǎǏǐǑǒǓǔǕǖǗǘǙǚǛǜǝǞǟǠǡǢǣǤǥǦǧǨǩǪǫǬǭǮǯǰDZDzdzǴ'; |
||
1256 | $this->assertEquals($expected, $result); |
||
1257 | |||
1258 | $find = 'Ƹ'; |
||
1259 | $result = mb_stristr($string, $find, true); |
||
1260 | $expected = 'ƑƒƓƔƕƖƗƘƙƚƛƜƝƞƟƠơƢƣƤƥƦƧƨƩƪƫƬƭƮƯưƱƲƳƴƵƶƷ'; |
||
1261 | $this->assertEquals($expected, $result); |
||
1262 | |||
1263 | $string = 'əɚɛɜɝɞɟɠɡɢɣɤɥɦɧɨɩɪɫɬɭɮɯɰɱɲɳɴɵɶɷɸɹɺɻɼɽɾɿʀʁʂʃʄʅʆʇʈʉʊʋʌʍʎʏʐʑʒʓʔʕʖʗʘʙʚʛʜʝʞʟʠʡʢʣʤʥʦʧʨʩʪʫʬʭʮʯʰʱʲʳʴʵʶʷʸʹʺʻʼ'; |
||
1264 | $find = 'Ʀ'; |
||
1265 | $result = mb_stristr($string, $find); |
||
1266 | $expected = 'ʀʁʂʃʄʅʆʇʈʉʊʋʌʍʎʏʐʑʒʓʔʕʖʗʘʙʚʛʜʝʞʟʠʡʢʣʤʥʦʧʨʩʪʫʬʭʮʯʰʱʲʳʴʵʶʷʸʹʺʻʼ'; |
||
1267 | $this->assertEquals($expected, $result); |
||
1268 | |||
1269 | $string = 'əɚɛɜɝɞɟɠɡɢɣɤɥɦɧɨɩɪɫɬɭɮɯɰɱɲɳɴɵɶɷɸɹɺɻɼɽɾɿʀʁʂʃʄʅʆʇʈʉʊʋʌʍʎʏʐʑʒʓʔʕʖʗʘʙʚʛʜʝʞʟʠʡʢʣʤʥʦʧʨʩʪʫʬʭʮʯʰʱʲʳʴʵʶʷʸʹʺʻʼ'; |
||
1270 | $find = 'Ʀ'; |
||
1271 | $result = mb_stristr($string, $find, true); |
||
1272 | $expected = 'əɚɛɜɝɞɟɠɡɢɣɤɥɦɧɨɩɪɫɬɭɮɯɰɱɲɳɴɵɶɷɸɹɺɻɼɽɾɿ'; |
||
1273 | $this->assertEquals($expected, $result); |
||
1274 | |||
1275 | $string = 'ЀЁЂЃЄЅІЇЈЉЊЋЌЍЎЏАБВГДЕЖЗИЙКЛ'; |
||
1276 | $find = 'ї'; |
||
1277 | $result = mb_stristr($string, $find); |
||
1278 | $expected = 'ЇЈЉЊЋЌЍЎЏАБВГДЕЖЗИЙКЛ'; |
||
1279 | $this->assertEquals($expected, $result); |
||
1280 | |||
1281 | $string = 'ЀЁЂЃЄЅІЇЈЉЊЋЌЍЎЏАБВГДЕЖЗИЙКЛ'; |
||
1282 | $find = 'ї'; |
||
1283 | $result = mb_stristr($string, $find, true); |
||
1284 | $expected = 'ЀЁЂЃЄЅІ'; |
||
1285 | $this->assertEquals($expected, $result); |
||
1286 | |||
1287 | $string = 'МНОПРСТУФХЦЧШЩЪЫЬЭЮЯабвгдежзийклмнопрстуфхцчшщъыь'; |
||
1288 | $find = 'Р'; |
||
1289 | $result = mb_stristr($string, $find); |
||
1290 | $expected = 'РСТУФХЦЧШЩЪЫЬЭЮЯабвгдежзийклмнопрстуфхцчшщъыь'; |
||
1291 | $this->assertEquals($expected, $result); |
||
1292 | |||
1293 | $string = 'МНОПРСТУФХЦЧШЩЪЫЬЭЮЯабвгдежзийклмнопрстуфхцчшщъыь'; |
||
1294 | $find = 'Р'; |
||
1295 | $result = mb_stristr($string, $find, true); |
||
1296 | $expected = 'МНОП'; |
||
1297 | $this->assertEquals($expected, $result); |
||
1298 | |||
1299 | $string = 'فقكلمنهوىيًٌٍَُ'; |
||
1300 | $find = 'ن'; |
||
1301 | $result = mb_stristr($string, $find); |
||
1302 | $expected = 'نهوىيًٌٍَُ'; |
||
1303 | $this->assertEquals($expected, $result); |
||
1304 | |||
1305 | $string = 'فقكلمنهوىيًٌٍَُ'; |
||
1306 | $find = 'ن'; |
||
1307 | $result = mb_stristr($string, $find, true); |
||
1308 | $expected = 'فقكلم'; |
||
1309 | $this->assertEquals($expected, $result); |
||
1310 | |||
1311 | $string = '✰✱✲✳✴✵✶✷✸✹✺✻✼✽✾✿❀❁❂❃❄❅❆❇❈❉❊❋❌❍❎❏❐❑❒❓❔❕❖❗❘❙❚❛❜❝❞'; |
||
1312 | $find = '✿'; |
||
1313 | $result = mb_stristr($string, $find); |
||
1314 | $expected = '✿❀❁❂❃❄❅❆❇❈❉❊❋❌❍❎❏❐❑❒❓❔❕❖❗❘❙❚❛❜❝❞'; |
||
1315 | $this->assertEquals($expected, $result); |
||
1316 | |||
1317 | $string = '✰✱✲✳✴✵✶✷✸✹✺✻✼✽✾✿❀❁❂❃❄❅❆❇❈❉❊❋❌❍❎❏❐❑❒❓❔❕❖❗❘❙❚❛❜❝❞'; |
||
1318 | $find = '✿'; |
||
1319 | $result = mb_stristr($string, $find, true); |
||
1320 | $expected = '✰✱✲✳✴✵✶✷✸✹✺✻✼✽✾'; |
||
1321 | $this->assertEquals($expected, $result); |
||
1322 | |||
1323 | $string = '⺀⺁⺂⺃⺄⺅⺆⺇⺈⺉⺊⺋⺌⺍⺎⺏⺐⺑⺒⺓⺔⺕⺖⺗⺘⺙⺛⺜⺝⺞⺟⺠⺡⺢⺣⺤⺥⺦⺧⺨⺩⺪⺫⺬⺭⺮⺯⺰⺱⺲⺳⺴⺵⺶⺷⺸⺹⺺⺻⺼⺽⺾⺿⻀⻁⻂⻃⻄⻅⻆⻇⻈⻉⻊⻋⻌⻍⻎⻏⻐⻑⻒⻓⻔⻕⻖⻗⻘⻙⻚⻛⻜⻝⻞⻟⻠'; |
||
1324 | $find = '⺐'; |
||
1325 | $result = mb_stristr($string, $find); |
||
1326 | $expected = '⺐⺑⺒⺓⺔⺕⺖⺗⺘⺙⺛⺜⺝⺞⺟⺠⺡⺢⺣⺤⺥⺦⺧⺨⺩⺪⺫⺬⺭⺮⺯⺰⺱⺲⺳⺴⺵⺶⺷⺸⺹⺺⺻⺼⺽⺾⺿⻀⻁⻂⻃⻄⻅⻆⻇⻈⻉⻊⻋⻌⻍⻎⻏⻐⻑⻒⻓⻔⻕⻖⻗⻘⻙⻚⻛⻜⻝⻞⻟⻠'; |
||
1327 | $this->assertEquals($expected, $result); |
||
1328 | |||
1329 | $string = '⺀⺁⺂⺃⺄⺅⺆⺇⺈⺉⺊⺋⺌⺍⺎⺏⺐⺑⺒⺓⺔⺕⺖⺗⺘⺙⺛⺜⺝⺞⺟⺠⺡⺢⺣⺤⺥⺦⺧⺨⺩⺪⺫⺬⺭⺮⺯⺰⺱⺲⺳⺴⺵⺶⺷⺸⺹⺺⺻⺼⺽⺾⺿⻀⻁⻂⻃⻄⻅⻆⻇⻈⻉⻊⻋⻌⻍⻎⻏⻐⻑⻒⻓⻔⻕⻖⻗⻘⻙⻚⻛⻜⻝⻞⻟⻠'; |
||
1330 | $find = '⺐'; |
||
1331 | $result = mb_stristr($string, $find, true); |
||
1332 | $expected = '⺀⺁⺂⺃⺄⺅⺆⺇⺈⺉⺊⺋⺌⺍⺎⺏'; |
||
1333 | $this->assertEquals($expected, $result); |
||
1334 | |||
1335 | $string = '⽅⽆⽇⽈⽉⽊⽋⽌⽍⽎⽏⽐⽑⽒⽓⽔⽕⽖⽗⽘⽙⽚⽛⽜⽝⽞⽟⽠⽡⽢⽣⽤⽥⽦⽧⽨⽩⽪⽫⽬⽭⽮⽯⽰⽱⽲⽳⽴⽵⽶⽷⽸⽹⽺⽻⽼⽽⽾⽿'; |
||
1336 | $find = '⽤'; |
||
1337 | $result = mb_stristr($string, $find); |
||
1338 | $expected = '⽤⽥⽦⽧⽨⽩⽪⽫⽬⽭⽮⽯⽰⽱⽲⽳⽴⽵⽶⽷⽸⽹⽺⽻⽼⽽⽾⽿'; |
||
1339 | $this->assertEquals($expected, $result); |
||
1340 | |||
1341 | $string = '⽅⽆⽇⽈⽉⽊⽋⽌⽍⽎⽏⽐⽑⽒⽓⽔⽕⽖⽗⽘⽙⽚⽛⽜⽝⽞⽟⽠⽡⽢⽣⽤⽥⽦⽧⽨⽩⽪⽫⽬⽭⽮⽯⽰⽱⽲⽳⽴⽵⽶⽷⽸⽹⽺⽻⽼⽽⽾⽿'; |
||
1342 | $find = '⽤'; |
||
1343 | $result = mb_stristr($string, $find, true); |
||
1344 | $expected = '⽅⽆⽇⽈⽉⽊⽋⽌⽍⽎⽏⽐⽑⽒⽓⽔⽕⽖⽗⽘⽙⽚⽛⽜⽝⽞⽟⽠⽡⽢⽣'; |
||
1345 | $this->assertEquals($expected, $result); |
||
1346 | |||
1347 | $string = '눡눢눣눤눥눦눧눨눩눪눫눬눭눮눯눰눱눲눳눴눵눶눷눸눹눺눻눼눽눾눿뉀뉁뉂뉃뉄뉅뉆뉇뉈뉉뉊뉋뉌뉍뉎뉏뉐뉑뉒뉓뉔뉕뉖뉗뉘뉙뉚뉛뉜뉝뉞뉟뉠뉡뉢뉣뉤뉥뉦뉧뉨뉩뉪뉫뉬뉭뉮뉯뉰뉱뉲뉳뉴뉵뉶뉷뉸뉹뉺뉻뉼뉽뉾뉿늀늁늂늃늄'; |
||
1348 | $find = '눻'; |
||
1349 | $result = mb_stristr($string, $find); |
||
1350 | $expected = '눻눼눽눾눿뉀뉁뉂뉃뉄뉅뉆뉇뉈뉉뉊뉋뉌뉍뉎뉏뉐뉑뉒뉓뉔뉕뉖뉗뉘뉙뉚뉛뉜뉝뉞뉟뉠뉡뉢뉣뉤뉥뉦뉧뉨뉩뉪뉫뉬뉭뉮뉯뉰뉱뉲뉳뉴뉵뉶뉷뉸뉹뉺뉻뉼뉽뉾뉿늀늁늂늃늄'; |
||
1351 | $this->assertEquals($expected, $result); |
||
1352 | |||
1353 | $string = '눡눢눣눤눥눦눧눨눩눪눫눬눭눮눯눰눱눲눳눴눵눶눷눸눹눺눻눼눽눾눿뉀뉁뉂뉃뉄뉅뉆뉇뉈뉉뉊뉋뉌뉍뉎뉏뉐뉑뉒뉓뉔뉕뉖뉗뉘뉙뉚뉛뉜뉝뉞뉟뉠뉡뉢뉣뉤뉥뉦뉧뉨뉩뉪뉫뉬뉭뉮뉯뉰뉱뉲뉳뉴뉵뉶뉷뉸뉹뉺뉻뉼뉽뉾뉿늀늁늂늃늄'; |
||
1354 | $find = '눻'; |
||
1355 | $result = mb_stristr($string, $find, true); |
||
1356 | $expected = '눡눢눣눤눥눦눧눨눩눪눫눬눭눮눯눰눱눲눳눴눵눶눷눸눹눺'; |
||
1357 | $this->assertEquals($expected, $result); |
||
1358 | |||
1359 | $string = 'ﹰﹱﹲﹳﹴﹶﹷﹸﹹﹺﹻﹼﹽﹾﹿﺀﺁﺂﺃﺄﺅﺆﺇﺈﺉﺊﺋﺌﺍﺎﺏﺐﺑﺒﺓﺔﺕﺖﺗﺘﺙﺚﺛﺜﺝﺞﺟﺠﺡﺢﺣﺤﺥﺦﺧﺨﺩﺪﺫﺬﺭﺮﺯﺰ'; |
||
1360 | $find = 'ﺞ'; |
||
1361 | $result = mb_stristr($string, $find); |
||
1362 | $expected = 'ﺞﺟﺠﺡﺢﺣﺤﺥﺦﺧﺨﺩﺪﺫﺬﺭﺮﺯﺰ'; |
||
1363 | $this->assertEquals($expected, $result); |
||
1364 | |||
1365 | $string = 'ﹰﹱﹲﹳﹴﹶﹷﹸﹹﹺﹻﹼﹽﹾﹿﺀﺁﺂﺃﺄﺅﺆﺇﺈﺉﺊﺋﺌﺍﺎﺏﺐﺑﺒﺓﺔﺕﺖﺗﺘﺙﺚﺛﺜﺝﺞﺟﺠﺡﺢﺣﺤﺥﺦﺧﺨﺩﺪﺫﺬﺭﺮﺯﺰ'; |
||
1366 | $find = 'ﺞ'; |
||
1367 | $result = mb_stristr($string, $find, true); |
||
1368 | $expected = 'ﹰﹱﹲﹳﹴﹶﹷﹸﹹﹺﹻﹼﹽﹾﹿﺀﺁﺂﺃﺄﺅﺆﺇﺈﺉﺊﺋﺌﺍﺎﺏﺐﺑﺒﺓﺔﺕﺖﺗﺘﺙﺚﺛﺜﺝ'; |
||
1369 | $this->assertEquals($expected, $result); |
||
1370 | |||
1371 | $string = 'ﺱﺲﺳﺴﺵﺶﺷﺸﺹﺺﺻﺼﺽﺾﺿﻀﻁﻂﻃﻄﻅﻆﻇﻈﻉﻊﻋﻌﻍﻎﻏﻐﻑﻒﻓﻔﻕﻖﻗﻘﻙﻚﻛﻜﻝﻞﻟﻠﻡﻢﻣﻤﻥﻦﻧﻨﻩﻪﻫﻬﻭﻮﻯﻰﻱﻲﻳﻴﻵﻶﻷﻸﻹﻺﻻﻼ'; |
||
1372 | $find = 'ﻞ'; |
||
1373 | $result = mb_stristr($string, $find); |
||
1374 | $expected = 'ﻞﻟﻠﻡﻢﻣﻤﻥﻦﻧﻨﻩﻪﻫﻬﻭﻮﻯﻰﻱﻲﻳﻴﻵﻶﻷﻸﻹﻺﻻﻼ'; |
||
1375 | $this->assertEquals($expected, $result); |
||
1376 | |||
1377 | $string = 'ﺱﺲﺳﺴﺵﺶﺷﺸﺹﺺﺻﺼﺽﺾﺿﻀﻁﻂﻃﻄﻅﻆﻇﻈﻉﻊﻋﻌﻍﻎﻏﻐﻑﻒﻓﻔﻕﻖﻗﻘﻙﻚﻛﻜﻝﻞﻟﻠﻡﻢﻣﻤﻥﻦﻧﻨﻩﻪﻫﻬﻭﻮﻯﻰﻱﻲﻳﻴﻵﻶﻷﻸﻹﻺﻻﻼ'; |
||
1378 | $find = 'ﻞ'; |
||
1379 | $result = mb_stristr($string, $find, true); |
||
1380 | $expected = 'ﺱﺲﺳﺴﺵﺶﺷﺸﺹﺺﺻﺼﺽﺾﺿﻀﻁﻂﻃﻄﻅﻆﻇﻈﻉﻊﻋﻌﻍﻎﻏﻐﻑﻒﻓﻔﻕﻖﻗﻘﻙﻚﻛﻜﻝ'; |
||
1381 | $this->assertEquals($expected, $result); |
||
1382 | |||
1383 | $string = 'abcdefghijklmnopqrstuvwxyz'; |
||
1384 | $find = 'K'; |
||
1385 | $result = mb_stristr($string, $find); |
||
1386 | $expected = 'klmnopqrstuvwxyz'; |
||
1387 | $this->assertEquals($expected, $result); |
||
1388 | |||
1389 | $string = 'abcdefghijklmnopqrstuvwxyz'; |
||
1390 | $find = 'K'; |
||
1391 | $result = mb_stristr($string, $find, true); |
||
1392 | $expected = 'abcdefghij'; |
||
1393 | $this->assertEquals($expected, $result); |
||
1394 | |||
1395 | $string = '。「」、・ヲァィゥェォャュョッーアイウエオカキク'; |
||
1396 | $find = 'ア'; |
||
1397 | $result = mb_stristr($string, $find); |
||
1398 | $expected = 'アイウエオカキク'; |
||
1399 | $this->assertEquals($expected, $result); |
||
1400 | |||
1401 | $string = '。「」、・ヲァィゥェォャュョッーアイウエオカキク'; |
||
1402 | $find = 'ア'; |
||
1403 | $result = mb_stristr($string, $find, true); |
||
1404 | $expected = '。「」、・ヲァィゥェォャュョッー'; |
||
1405 | $this->assertEquals($expected, $result); |
||
1406 | |||
1407 | $string = 'ケコサシスセソタチツテトナニヌネノハヒフヘホマミムメモヤユヨラリルレロワン゙'; |
||
1408 | $find = 'ハ'; |
||
1409 | $result = mb_stristr($string, $find); |
||
1410 | $expected = 'ハヒフヘホマミムメモヤユヨラリルレロワン゙'; |
||
1411 | $this->assertEquals($expected, $result); |
||
1412 | |||
1413 | $string = 'ケコサシスセソタチツテトナニヌネノハヒフヘホマミムメモヤユヨラリルレロワン゙'; |
||
1414 | $find = 'ハ'; |
||
1415 | $result = mb_stristr($string, $find, true); |
||
1416 | $expected = 'ケコサシスセソタチツテトナニヌネノ'; |
||
1417 | $this->assertEquals($expected, $result); |
||
1418 | |||
1419 | $string = 'Ĥēĺļŏ, Ŵőřļď!'; |
||
1420 | $find = 'Ő'; |
||
1421 | $result = mb_stristr($string, $find); |
||
1422 | $expected = 'őřļď!'; |
||
1423 | $this->assertEquals($expected, $result); |
||
1424 | |||
1425 | $string = 'Ĥēĺļŏ, Ŵőřļď!'; |
||
1426 | $find = 'Ő'; |
||
1427 | $result = mb_stristr($string, $find, true); |
||
1428 | $expected = 'Ĥēĺļŏ, Ŵ'; |
||
1429 | $this->assertEquals($expected, $result); |
||
1430 | |||
1431 | $string = 'Ĥēĺļŏ, Ŵőřļď!'; |
||
1432 | $find = 'ĺļ'; |
||
1433 | $result = mb_stristr($string, $find, true); |
||
1434 | $expected = 'Ĥē'; |
||
1435 | $this->assertEquals($expected, $result); |
||
1436 | |||
1437 | $string = 'Hello, World!'; |
||
1438 | $find = 'O'; |
||
1439 | $result = mb_stristr($string, $find); |
||
1440 | $expected = 'o, World!'; |
||
1441 | $this->assertEquals($expected, $result); |
||
1442 | |||
1443 | $string = 'Hello, World!'; |
||
1444 | $find = 'O'; |
||
1445 | $result = mb_stristr($string, $find, true); |
||
1446 | $expected = 'Hell'; |
||
1447 | $this->assertEquals($expected, $result); |
||
1448 | |||
1449 | $string = 'Hello, World!'; |
||
1450 | $find = 'Wo'; |
||
1451 | $result = mb_stristr($string, $find); |
||
1452 | $expected = 'World!'; |
||
1453 | $this->assertEquals($expected, $result); |
||
1454 | |||
1455 | $string = 'Hello, World!'; |
||
1456 | $find = 'Wo'; |
||
1457 | $result = mb_stristr($string, $find, true); |
||
1458 | $expected = 'Hello, '; |
||
1459 | $this->assertEquals($expected, $result); |
||
1460 | |||
1461 | $string = 'Hello, World!'; |
||
1462 | $find = 'll'; |
||
1463 | $result = mb_stristr($string, $find); |
||
1464 | $expected = 'llo, World!'; |
||
1465 | $this->assertEquals($expected, $result); |
||
1466 | |||
1467 | $string = 'Hello, World!'; |
||
1468 | $find = 'll'; |
||
1469 | $result = mb_stristr($string, $find, true); |
||
1470 | $expected = 'He'; |
||
1471 | $this->assertEquals($expected, $result); |
||
1472 | |||
1473 | $string = 'Hello, World!'; |
||
1474 | $find = 'rld'; |
||
1475 | $result = mb_stristr($string, $find); |
||
1476 | $expected = 'rld!'; |
||
1477 | $this->assertEquals($expected, $result); |
||
1478 | |||
1479 | $string = 'Hello, World!'; |
||
1480 | $find = 'rld'; |
||
1481 | $result = mb_stristr($string, $find, true); |
||
1482 | $expected = 'Hello, Wo'; |
||
1483 | $this->assertEquals($expected, $result); |
||
1484 | |||
1485 | $string = 'čini'; |
||
1486 | $find = 'N'; |
||
1487 | $result = mb_stristr($string, $find); |
||
1488 | $expected = 'ni'; |
||
1489 | $this->assertEquals($expected, $result); |
||
1490 | |||
1491 | $string = 'čini'; |
||
1492 | $find = 'N'; |
||
1493 | $result = mb_stristr($string, $find, true); |
||
1494 | $expected = 'či'; |
||
1495 | $this->assertEquals($expected, $result); |
||
1496 | |||
1497 | $string = 'moći'; |
||
1498 | $find = 'Ć'; |
||
1499 | $result = mb_stristr($string, $find); |
||
1500 | $expected = 'ći'; |
||
1501 | $this->assertEquals($expected, $result); |
||
1502 | |||
1503 | $string = 'moći'; |
||
1504 | $find = 'Ć'; |
||
1505 | $result = mb_stristr($string, $find, true); |
||
1506 | $expected = 'mo'; |
||
1507 | $this->assertEquals($expected, $result); |
||
1508 | |||
1509 | $string = 'državni'; |
||
1510 | $find = 'Ž'; |
||
1511 | $result = mb_stristr($string, $find); |
||
1512 | $expected = 'žavni'; |
||
1513 | $this->assertEquals($expected, $result); |
||
1514 | |||
1515 | $string = 'državni'; |
||
1516 | $find = 'Ž'; |
||
1517 | $result = mb_stristr($string, $find, true); |
||
1518 | $expected = 'dr'; |
||
1519 | $this->assertEquals($expected, $result); |
||
1520 | |||
1521 | $string = '把百度设为首页'; |
||
1522 | $find = '设'; |
||
1523 | $result = mb_stristr($string, $find); |
||
1524 | $expected = '设为首页'; |
||
1525 | $this->assertEquals($expected, $result); |
||
1526 | |||
1527 | $string = '把百度设为首页'; |
||
1528 | $find = '设'; |
||
1529 | $result = mb_stristr($string, $find, true); |
||
1530 | $expected = '把百度'; |
||
1531 | $this->assertEquals($expected, $result); |
||
1532 | |||
1533 | $string = '一二三周永龍'; |
||
1534 | $find = '周'; |
||
1535 | $result = mb_stristr($string, $find); |
||
1536 | $expected = '周永龍'; |
||
1537 | $this->assertEquals($expected, $result); |
||
1538 | |||
1539 | $string = '一二三周永龍'; |
||
1540 | $find = '周'; |
||
1541 | $result = mb_stristr($string, $find, true); |
||
1542 | $expected = '一二三'; |
||
1543 | $this->assertEquals($expected, $result); |
||
1544 | |||
1545 | $string = '一二三周永龍'; |
||
1546 | $find = '二周'; |
||
1547 | $result = mb_stristr($string, $find); |
||
1548 | $expected = false; |
||
1549 | $this->assertEquals($expected, $result); |
||
1550 | } |
||
1551 | |||
1552 | /**
|
||
1553 | * testMultibyteStristr method
|
||
1554 | *
|
||
1555 | * @return void
|
||
1556 | */
|
||
1557 | public function testMultibyteStristr() { |
||
1558 | $string = 'ABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789'; |
||
1559 | $find = 'f'; |
||
1560 | $result = Multibyte::stristr($string, $find); |
||
1561 | $expected = 'FGHIJKLMNOPQRSTUVWXYZ0123456789'; |
||
1562 | $this->assertEquals($expected, $result); |
||
1563 | |||
1564 | $string = 'ABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789'; |
||
1565 | $find = 'f'; |
||
1566 | $result = Multibyte::stristr($string, $find, true); |
||
1567 | $expected = 'ABCDE'; |
||
1568 | $this->assertEquals($expected, $result); |
||
1569 | |||
1570 | $string = 'ÀÁÂÃÄÅÆÇÈÉÊËÌÍÎÏÐÑÒÓÔÕÖØÙÚÛÜÝÞ'; |
||
1571 | $find = 'å'; |
||
1572 | $result = Multibyte::stristr($string, $find); |
||
1573 | $expected = 'ÅÆÇÈÉÊËÌÍÎÏÐÑÒÓÔÕÖØÙÚÛÜÝÞ'; |
||
1574 | $this->assertEquals($expected, $result); |
||
1575 | |||
1576 | $string = 'ÀÁÂÃÄÅÆÇÈÉÊËÌÍÎÏÐÑÒÓÔÕÖØÙÚÛÜÝÞ'; |
||
1577 | $find = 'å'; |
||
1578 | $result = Multibyte::stristr($string, $find, true); |
||
1579 | $expected = 'ÀÁÂÃÄ'; |
||
1580 | $this->assertEquals($expected, $result); |
||
1581 | |||
1582 | $string = 'ĀĂĄĆĈĊČĎĐĒĔĖĘĚĜĞĠĢĤĦĨĪĬĮIJĴĶĹĻĽĿŁŃŅŇŊŌŎŐŒŔŖŘŚŜŞŠŢŤŦŨŪŬŮŰŲŴŶŹŻŽ'; |
||
1583 | $find = 'ċ'; |
||
1584 | $result = Multibyte::stristr($string, $find); |
||
1585 | $expected = 'ĊČĎĐĒĔĖĘĚĜĞĠĢĤĦĨĪĬĮIJĴĶĹĻĽĿŁŃŅŇŊŌŎŐŒŔŖŘŚŜŞŠŢŤŦŨŪŬŮŰŲŴŶŹŻŽ'; |
||
1586 | $this->assertEquals($expected, $result); |
||
1587 | |||
1588 | $string = 'ĀĂĄĆĈĊČĎĐĒĔĖĘĚĜĞĠĢĤĦĨĪĬĮIJĴĶĹĻĽĿŁŃŅŇŊŌŎŐŒŔŖŘŚŜŞŠŢŤŦŨŪŬŮŰŲŴŶŹŻŽ'; |
||
1589 | $find = 'ċ'; |
||
1590 | $result = Multibyte::stristr($string, $find, true); |
||
1591 | $expected = 'ĀĂĄĆĈ'; |
||
1592 | $this->assertEquals($expected, $result); |
||
1593 | |||
1594 | $string = '!"#$%&\'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~'; |
||
1595 | $find = 'f'; |
||
1596 | $result = Multibyte::stristr($string, $find); |
||
1597 | $expected = 'FGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~'; |
||
1598 | $this->assertEquals($expected, $result); |
||
1599 | |||
1600 | $string = '!"#$%&\'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~'; |
||
1601 | $find = 'f'; |
||
1602 | $result = Multibyte::stristr($string, $find, true); |
||
1603 | $expected = '!"#$%&\'()*+,-./0123456789:;<=>?@ABCDE'; |
||
1604 | $this->assertEquals($expected, $result); |
||
1605 | |||
1606 | $string = '¡¢£¤¥¦§¨©ª«¬®¯°±²³´µ¶·¸¹º»¼½¾¿ÀÁÂÃÄÅÆÇÈ'; |
||
1607 | $find = 'Μ'; |
||
1608 | $result = Multibyte::stristr($string, $find); |
||
1609 | $expected = 'µ¶·¸¹º»¼½¾¿ÀÁÂÃÄÅÆÇÈ'; |
||
1610 | $this->assertEquals($expected, $result); |
||
1611 | |||
1612 | $string = '¡¢£¤¥¦§¨©ª«¬®¯°±²³´µ¶·¸¹º»¼½¾¿ÀÁÂÃÄÅÆÇÈ'; |
||
1613 | $find = 'Μ'; |
||
1614 | $result = Multibyte::stristr($string, $find, true); |
||
1615 | $expected = '¡¢£¤¥¦§¨©ª«¬®¯°±²³´'; |
||
1616 | $this->assertEquals($expected, $result); |
||
1617 | |||
1618 | $string = 'ÉÊËÌÍÎÏÐÑÒÓÔÕÖ×ØÙÚÛÜÝÞßàáâãäåæçèéêëìíîïðñòóôõö÷øùúûüýþÿĀāĂ㥹ĆćĈĉĊċČčĎďĐđĒēĔĕĖėĘęĚěĜĝĞğĠġĢģĤĥĦħĨĩĪīĬ'; |
||
1619 | $find = 'þ'; |
||
1620 | $result = Multibyte::stristr($string, $find); |
||
1621 | $expected = 'Þßàáâãäåæçèéêëìíîïðñòóôõö÷øùúûüýþÿĀāĂ㥹ĆćĈĉĊċČčĎďĐđĒēĔĕĖėĘęĚěĜĝĞğĠġĢģĤĥĦħĨĩĪīĬ'; |
||
1622 | $this->assertEquals($expected, $result); |
||
1623 | |||
1624 | $string = 'ÉÊËÌÍÎÏÐÑÒÓÔÕÖ×ØÙÚÛÜÝÞßàáâãäåæçèéêëìíîïðñòóôõö÷øùúûüýþÿĀāĂ㥹ĆćĈĉĊċČčĎďĐđĒēĔĕĖėĘęĚěĜĝĞğĠġĢģĤĥĦħĨĩĪīĬ'; |
||
1625 | $find = 'þ'; |
||
1626 | $result = Multibyte::stristr($string, $find, true); |
||
1627 | $expected = 'ÉÊËÌÍÎÏÐÑÒÓÔÕÖ×ØÙÚÛÜÝ'; |
||
1628 | $this->assertEquals($expected, $result); |
||
1629 | |||
1630 | $string = 'ĭĮįİıIJijĴĵĶķĸĹĺĻļĽľĿŀŁłŃńŅņŇňʼnŊŋŌōŎŏŐőŒœŔŕŖŗŘřŚśŜŝŞşŠšŢţŤťŦŧŨũŪūŬŭŮůŰűŲųŴŵŶŷŸŹźŻżŽžſƀƁƂƃƄƅƆƇƈƉƊƋƌƍƎƏƐ'; |
||
1631 | $find = 'Ņ'; |
||
1632 | $result = Multibyte::stristr($string, $find); |
||
1633 | $expected = 'ŅņŇňʼnŊŋŌōŎŏŐőŒœŔŕŖŗŘřŚśŜŝŞşŠšŢţŤťŦŧŨũŪūŬŭŮůŰűŲųŴŵŶŷŸŹźŻżŽžſƀƁƂƃƄƅƆƇƈƉƊƋƌƍƎƏƐ'; |
||
1634 | $this->assertEquals($expected, $result); |
||
1635 | |||
1636 | $string = 'ĭĮįİıIJijĴĵĶķĸĹĺĻļĽľĿŀŁłŃńŅņŇňʼnŊŋŌōŎŏŐőŒœŔŕŖŗŘřŚśŜŝŞşŠšŢţŤťŦŧŨũŪūŬŭŮůŰűŲųŴŵŶŷŸŹźŻżŽžſƀƁƂƃƄƅƆƇƈƉƊƋƌƍƎƏƐ'; |
||
1637 | $find = 'Ņ'; |
||
1638 | $result = Multibyte::stristr($string, $find, true); |
||
1639 | $expected = 'ĭĮįİıIJijĴĵĶķĸĹĺĻļĽľĿŀŁłŃń'; |
||
1640 | $this->assertEquals($expected, $result); |
||
1641 | |||
1642 | $string = 'ƑƒƓƔƕƖƗƘƙƚƛƜƝƞƟƠơƢƣƤƥƦƧƨƩƪƫƬƭƮƯưƱƲƳƴƵƶƷƸƹƺƻƼƽƾƿǀǁǂǃDŽDždžLJLjljNJNjnjǍǎǏǐǑǒǓǔǕǖǗǘǙǚǛǜǝǞǟǠǡǢǣǤǥǦǧǨǩǪǫǬǭǮǯǰDZDzdzǴ'; |
||
1643 | $find = 'Ƹ'; |
||
1644 | $result = Multibyte::stristr($string, $find); |
||
1645 | $expected = 'ƸƹƺƻƼƽƾƿǀǁǂǃDŽDždžLJLjljNJNjnjǍǎǏǐǑǒǓǔǕǖǗǘǙǚǛǜǝǞǟǠǡǢǣǤǥǦǧǨǩǪǫǬǭǮǯǰDZDzdzǴ'; |
||
1646 | $this->assertEquals($expected, $result); |
||
1647 | |||
1648 | $find = 'Ƹ'; |
||
1649 | $result = Multibyte::stristr($string, $find, true); |
||
1650 | $expected = 'ƑƒƓƔƕƖƗƘƙƚƛƜƝƞƟƠơƢƣƤƥƦƧƨƩƪƫƬƭƮƯưƱƲƳƴƵƶƷ'; |
||
1651 | $this->assertEquals($expected, $result); |
||
1652 | |||
1653 | $string = 'əɚɛɜɝɞɟɠɡɢɣɤɥɦɧɨɩɪɫɬɭɮɯɰɱɲɳɴɵɶɷɸɹɺɻɼɽɾɿʀʁʂʃʄʅʆʇʈʉʊʋʌʍʎʏʐʑʒʓʔʕʖʗʘʙʚʛʜʝʞʟʠʡʢʣʤʥʦʧʨʩʪʫʬʭʮʯʰʱʲʳʴʵʶʷʸʹʺʻʼ'; |
||
1654 | $find = 'Ʀ'; |
||
1655 | $result = Multibyte::stristr($string, $find); |
||
1656 | $expected = 'ʀʁʂʃʄʅʆʇʈʉʊʋʌʍʎʏʐʑʒʓʔʕʖʗʘʙʚʛʜʝʞʟʠʡʢʣʤʥʦʧʨʩʪʫʬʭʮʯʰʱʲʳʴʵʶʷʸʹʺʻʼ'; |
||
1657 | $this->assertEquals($expected, $result); |
||
1658 | |||
1659 | $string = 'əɚɛɜɝɞɟɠɡɢɣɤɥɦɧɨɩɪɫɬɭɮɯɰɱɲɳɴɵɶɷɸɹɺɻɼɽɾɿʀʁʂʃʄʅʆʇʈʉʊʋʌʍʎʏʐʑʒʓʔʕʖʗʘʙʚʛʜʝʞʟʠʡʢʣʤʥʦʧʨʩʪʫʬʭʮʯʰʱʲʳʴʵʶʷʸʹʺʻʼ'; |
||
1660 | $find = 'Ʀ'; |
||
1661 | $result = Multibyte::stristr($string, $find, true); |
||
1662 | $expected = 'əɚɛɜɝɞɟɠɡɢɣɤɥɦɧɨɩɪɫɬɭɮɯɰɱɲɳɴɵɶɷɸɹɺɻɼɽɾɿ'; |
||
1663 | $this->assertEquals($expected, $result); |
||
1664 | |||
1665 | $string = 'ЀЁЂЃЄЅІЇЈЉЊЋЌЍЎЏАБВГДЕЖЗИЙКЛ'; |
||
1666 | $find = 'ї'; |
||
1667 | $result = Multibyte::stristr($string, $find); |
||
1668 | $expected = 'ЇЈЉЊЋЌЍЎЏАБВГДЕЖЗИЙКЛ'; |
||
1669 | $this->assertEquals($expected, $result); |
||
1670 | |||
1671 | $string = 'ЀЁЂЃЄЅІЇЈЉЊЋЌЍЎЏАБВГДЕЖЗИЙКЛ'; |
||
1672 | $find = 'ї'; |
||
1673 | $result = Multibyte::stristr($string, $find, true); |
||
1674 | $expected = 'ЀЁЂЃЄЅІ'; |
||
1675 | $this->assertEquals($expected, $result); |
||
1676 | |||
1677 | $string = 'МНОПРСТУФХЦЧШЩЪЫЬЭЮЯабвгдежзийклмнопрстуфхцчшщъыь'; |
||
1678 | $find = 'Р'; |
||
1679 | $result = Multibyte::stristr($string, $find); |
||
1680 | $expected = 'РСТУФХЦЧШЩЪЫЬЭЮЯабвгдежзийклмнопрстуфхцчшщъыь'; |
||
1681 | $this->assertEquals($expected, $result); |
||
1682 | |||
1683 | $string = 'МНОПРСТУФХЦЧШЩЪЫЬЭЮЯабвгдежзийклмнопрстуфхцчшщъыь'; |
||
1684 | $find = 'Р'; |
||
1685 | $result = Multibyte::stristr($string, $find, true); |
||
1686 | $expected = 'МНОП'; |
||
1687 | $this->assertEquals($expected, $result); |
||
1688 | |||
1689 | $string = 'فقكلمنهوىيًٌٍَُ'; |
||
1690 | $find = 'ن'; |
||
1691 | $result = Multibyte::stristr($string, $find); |
||
1692 | $expected = 'نهوىيًٌٍَُ'; |
||
1693 | $this->assertEquals($expected, $result); |
||
1694 | |||
1695 | $string = 'فقكلمنهوىيًٌٍَُ'; |
||
1696 | $find = 'ن'; |
||
1697 | $result = Multibyte::stristr($string, $find, true); |
||
1698 | $expected = 'فقكلم'; |
||
1699 | $this->assertEquals($expected, $result); |
||
1700 | |||
1701 | $string = '✰✱✲✳✴✵✶✷✸✹✺✻✼✽✾✿❀❁❂❃❄❅❆❇❈❉❊❋❌❍❎❏❐❑❒❓❔❕❖❗❘❙❚❛❜❝❞'; |
||
1702 | $find = '✿'; |
||
1703 | $result = Multibyte::stristr($string, $find); |
||
1704 | $expected = '✿❀❁❂❃❄❅❆❇❈❉❊❋❌❍❎❏❐❑❒❓❔❕❖❗❘❙❚❛❜❝❞'; |
||
1705 | $this->assertEquals($expected, $result); |
||
1706 | |||
1707 | $string = '✰✱✲✳✴✵✶✷✸✹✺✻✼✽✾✿❀❁❂❃❄❅❆❇❈❉❊❋❌❍❎❏❐❑❒❓❔❕❖❗❘❙❚❛❜❝❞'; |
||
1708 | $find = '✿'; |
||
1709 | $result = Multibyte::stristr($string, $find, true); |
||
1710 | $expected = '✰✱✲✳✴✵✶✷✸✹✺✻✼✽✾'; |
||
1711 | $this->assertEquals($expected, $result); |
||
1712 | |||
1713 | $string = '⺀⺁⺂⺃⺄⺅⺆⺇⺈⺉⺊⺋⺌⺍⺎⺏⺐⺑⺒⺓⺔⺕⺖⺗⺘⺙⺛⺜⺝⺞⺟⺠⺡⺢⺣⺤⺥⺦⺧⺨⺩⺪⺫⺬⺭⺮⺯⺰⺱⺲⺳⺴⺵⺶⺷⺸⺹⺺⺻⺼⺽⺾⺿⻀⻁⻂⻃⻄⻅⻆⻇⻈⻉⻊⻋⻌⻍⻎⻏⻐⻑⻒⻓⻔⻕⻖⻗⻘⻙⻚⻛⻜⻝⻞⻟⻠'; |
||
1714 | $find = '⺐'; |
||
1715 | $result = Multibyte::stristr($string, $find); |
||
1716 | $expected = '⺐⺑⺒⺓⺔⺕⺖⺗⺘⺙⺛⺜⺝⺞⺟⺠⺡⺢⺣⺤⺥⺦⺧⺨⺩⺪⺫⺬⺭⺮⺯⺰⺱⺲⺳⺴⺵⺶⺷⺸⺹⺺⺻⺼⺽⺾⺿⻀⻁⻂⻃⻄⻅⻆⻇⻈⻉⻊⻋⻌⻍⻎⻏⻐⻑⻒⻓⻔⻕⻖⻗⻘⻙⻚⻛⻜⻝⻞⻟⻠'; |
||
1717 | $this->assertEquals($expected, $result); |
||
1718 | |||
1719 | $string = '⺀⺁⺂⺃⺄⺅⺆⺇⺈⺉⺊⺋⺌⺍⺎⺏⺐⺑⺒⺓⺔⺕⺖⺗⺘⺙⺛⺜⺝⺞⺟⺠⺡⺢⺣⺤⺥⺦⺧⺨⺩⺪⺫⺬⺭⺮⺯⺰⺱⺲⺳⺴⺵⺶⺷⺸⺹⺺⺻⺼⺽⺾⺿⻀⻁⻂⻃⻄⻅⻆⻇⻈⻉⻊⻋⻌⻍⻎⻏⻐⻑⻒⻓⻔⻕⻖⻗⻘⻙⻚⻛⻜⻝⻞⻟⻠'; |
||
1720 | $find = '⺐'; |
||
1721 | $result = Multibyte::stristr($string, $find, true); |
||
1722 | $expected = '⺀⺁⺂⺃⺄⺅⺆⺇⺈⺉⺊⺋⺌⺍⺎⺏'; |
||
1723 | $this->assertEquals($expected, $result); |
||
1724 | |||
1725 | $string = '⽅⽆⽇⽈⽉⽊⽋⽌⽍⽎⽏⽐⽑⽒⽓⽔⽕⽖⽗⽘⽙⽚⽛⽜⽝⽞⽟⽠⽡⽢⽣⽤⽥⽦⽧⽨⽩⽪⽫⽬⽭⽮⽯⽰⽱⽲⽳⽴⽵⽶⽷⽸⽹⽺⽻⽼⽽⽾⽿'; |
||
1726 | $find = '⽤'; |
||
1727 | $result = Multibyte::stristr($string, $find); |
||
1728 | $expected = '⽤⽥⽦⽧⽨⽩⽪⽫⽬⽭⽮⽯⽰⽱⽲⽳⽴⽵⽶⽷⽸⽹⽺⽻⽼⽽⽾⽿'; |
||
1729 | $this->assertEquals($expected, $result); |
||
1730 | |||
1731 | $string = '⽅⽆⽇⽈⽉⽊⽋⽌⽍⽎⽏⽐⽑⽒⽓⽔⽕⽖⽗⽘⽙⽚⽛⽜⽝⽞⽟⽠⽡⽢⽣⽤⽥⽦⽧⽨⽩⽪⽫⽬⽭⽮⽯⽰⽱⽲⽳⽴⽵⽶⽷⽸⽹⽺⽻⽼⽽⽾⽿'; |
||
1732 | $find = '⽤'; |
||
1733 | $result = Multibyte::stristr($string, $find, true); |
||
1734 | $expected = '⽅⽆⽇⽈⽉⽊⽋⽌⽍⽎⽏⽐⽑⽒⽓⽔⽕⽖⽗⽘⽙⽚⽛⽜⽝⽞⽟⽠⽡⽢⽣'; |
||
1735 | $this->assertEquals($expected, $result); |
||
1736 | |||
1737 | $string = '눡눢눣눤눥눦눧눨눩눪눫눬눭눮눯눰눱눲눳눴눵눶눷눸눹눺눻눼눽눾눿뉀뉁뉂뉃뉄뉅뉆뉇뉈뉉뉊뉋뉌뉍뉎뉏뉐뉑뉒뉓뉔뉕뉖뉗뉘뉙뉚뉛뉜뉝뉞뉟뉠뉡뉢뉣뉤뉥뉦뉧뉨뉩뉪뉫뉬뉭뉮뉯뉰뉱뉲뉳뉴뉵뉶뉷뉸뉹뉺뉻뉼뉽뉾뉿늀늁늂늃늄'; |
||
1738 | $find = '눻'; |
||
1739 | $result = Multibyte::stristr($string, $find); |
||
1740 | $expected = '눻눼눽눾눿뉀뉁뉂뉃뉄뉅뉆뉇뉈뉉뉊뉋뉌뉍뉎뉏뉐뉑뉒뉓뉔뉕뉖뉗뉘뉙뉚뉛뉜뉝뉞뉟뉠뉡뉢뉣뉤뉥뉦뉧뉨뉩뉪뉫뉬뉭뉮뉯뉰뉱뉲뉳뉴뉵뉶뉷뉸뉹뉺뉻뉼뉽뉾뉿늀늁늂늃늄'; |
||
1741 | $this->assertEquals($expected, $result); |
||
1742 | |||
1743 | $string = '눡눢눣눤눥눦눧눨눩눪눫눬눭눮눯눰눱눲눳눴눵눶눷눸눹눺눻눼눽눾눿뉀뉁뉂뉃뉄뉅뉆뉇뉈뉉뉊뉋뉌뉍뉎뉏뉐뉑뉒뉓뉔뉕뉖뉗뉘뉙뉚뉛뉜뉝뉞뉟뉠뉡뉢뉣뉤뉥뉦뉧뉨뉩뉪뉫뉬뉭뉮뉯뉰뉱뉲뉳뉴뉵뉶뉷뉸뉹뉺뉻뉼뉽뉾뉿늀늁늂늃늄'; |
||
1744 | $find = '눻'; |
||
1745 | $result = Multibyte::stristr($string, $find, true); |
||
1746 | $expected = '눡눢눣눤눥눦눧눨눩눪눫눬눭눮눯눰눱눲눳눴눵눶눷눸눹눺'; |
||
1747 | $this->assertEquals($expected, $result); |
||
1748 | |||
1749 | $string = 'ﹰﹱﹲﹳﹴﹶﹷﹸﹹﹺﹻﹼﹽﹾﹿﺀﺁﺂﺃﺄﺅﺆﺇﺈﺉﺊﺋﺌﺍﺎﺏﺐﺑﺒﺓﺔﺕﺖﺗﺘﺙﺚﺛﺜﺝﺞﺟﺠﺡﺢﺣﺤﺥﺦﺧﺨﺩﺪﺫﺬﺭﺮﺯﺰ'; |
||
1750 | $find = 'ﺞ'; |
||
1751 | $result = Multibyte::stristr($string, $find); |
||
1752 | $expected = 'ﺞﺟﺠﺡﺢﺣﺤﺥﺦﺧﺨﺩﺪﺫﺬﺭﺮﺯﺰ'; |
||
1753 | $this->assertEquals($expected, $result); |
||
1754 | |||
1755 | $string = 'ﹰﹱﹲﹳﹴﹶﹷﹸﹹﹺﹻﹼﹽﹾﹿﺀﺁﺂﺃﺄﺅﺆﺇﺈﺉﺊﺋﺌﺍﺎﺏﺐﺑﺒﺓﺔﺕﺖﺗﺘﺙﺚﺛﺜﺝﺞﺟﺠﺡﺢﺣﺤﺥﺦﺧﺨﺩﺪﺫﺬﺭﺮﺯﺰ'; |
||
1756 | $find = 'ﺞ'; |
||
1757 | $result = Multibyte::stristr($string, $find, true); |
||
1758 | $expected = 'ﹰﹱﹲﹳﹴﹶﹷﹸﹹﹺﹻﹼﹽﹾﹿﺀﺁﺂﺃﺄﺅﺆﺇﺈﺉﺊﺋﺌﺍﺎﺏﺐﺑﺒﺓﺔﺕﺖﺗﺘﺙﺚﺛﺜﺝ'; |
||
1759 | $this->assertEquals($expected, $result); |
||
1760 | |||
1761 | $string = 'ﺱﺲﺳﺴﺵﺶﺷﺸﺹﺺﺻﺼﺽﺾﺿﻀﻁﻂﻃﻄﻅﻆﻇﻈﻉﻊﻋﻌﻍﻎﻏﻐﻑﻒﻓﻔﻕﻖﻗﻘﻙﻚﻛﻜﻝﻞﻟﻠﻡﻢﻣﻤﻥﻦﻧﻨﻩﻪﻫﻬﻭﻮﻯﻰﻱﻲﻳﻴﻵﻶﻷﻸﻹﻺﻻﻼ'; |
||
1762 | $find = 'ﻞ'; |
||
1763 | $result = Multibyte::stristr($string, $find); |
||
1764 | $expected = 'ﻞﻟﻠﻡﻢﻣﻤﻥﻦﻧﻨﻩﻪﻫﻬﻭﻮﻯﻰﻱﻲﻳﻴﻵﻶﻷﻸﻹﻺﻻﻼ'; |
||
1765 | $this->assertEquals($expected, $result); |
||
1766 | |||
1767 | $string = 'ﺱﺲﺳﺴﺵﺶﺷﺸﺹﺺﺻﺼﺽﺾﺿﻀﻁﻂﻃﻄﻅﻆﻇﻈﻉﻊﻋﻌﻍﻎﻏﻐﻑﻒﻓﻔﻕﻖﻗﻘﻙﻚﻛﻜﻝﻞﻟﻠﻡﻢﻣﻤﻥﻦﻧﻨﻩﻪﻫﻬﻭﻮﻯﻰﻱﻲﻳﻴﻵﻶﻷﻸﻹﻺﻻﻼ'; |
||
1768 | $find = 'ﻞ'; |
||
1769 | $result = Multibyte::stristr($string, $find, true); |
||
1770 | $expected = 'ﺱﺲﺳﺴﺵﺶﺷﺸﺹﺺﺻﺼﺽﺾﺿﻀﻁﻂﻃﻄﻅﻆﻇﻈﻉﻊﻋﻌﻍﻎﻏﻐﻑﻒﻓﻔﻕﻖﻗﻘﻙﻚﻛﻜﻝ'; |
||
1771 | $this->assertEquals($expected, $result); |
||
1772 | |||
1773 | $string = 'abcdefghijklmnopqrstuvwxyz'; |
||
1774 | $find = 'K'; |
||
1775 | $result = Multibyte::stristr($string, $find); |
||
1776 | $expected = 'klmnopqrstuvwxyz'; |
||
1777 | $this->assertEquals($expected, $result); |
||
1778 | |||
1779 | $string = 'abcdefghijklmnopqrstuvwxyz'; |
||
1780 | $find = 'K'; |
||
1781 | $result = Multibyte::stristr($string, $find, true); |
||
1782 | $expected = 'abcdefghij'; |
||
1783 | $this->assertEquals($expected, $result); |
||
1784 | |||
1785 | $string = '。「」、・ヲァィゥェォャュョッーアイウエオカキク'; |
||
1786 | $find = 'ア'; |
||
1787 | $result = Multibyte::stristr($string, $find); |
||
1788 | $expected = 'アイウエオカキク'; |
||
1789 | $this->assertEquals($expected, $result); |
||
1790 | |||
1791 | $string = '。「」、・ヲァィゥェォャュョッーアイウエオカキク'; |
||
1792 | $find = 'ア'; |
||
1793 | $result = Multibyte::stristr($string, $find, true); |
||
1794 | $expected = '。「」、・ヲァィゥェォャュョッー'; |
||
1795 | $this->assertEquals($expected, $result); |
||
1796 | |||
1797 | $string = 'ケコサシスセソタチツテトナニヌネノハヒフヘホマミムメモヤユヨラリルレロワン゙'; |
||
1798 | $find = 'ハ'; |
||
1799 | $result = Multibyte::stristr($string, $find); |
||
1800 | $expected = 'ハヒフヘホマミムメモヤユヨラリルレロワン゙'; |
||
1801 | $this->assertEquals($expected, $result); |
||
1802 | |||
1803 | $string = 'ケコサシスセソタチツテトナニヌネノハヒフヘホマミムメモヤユヨラリルレロワン゙'; |
||
1804 | $find = 'ハ'; |
||
1805 | $result = Multibyte::stristr($string, $find, true); |
||
1806 | $expected = 'ケコサシスセソタチツテトナニヌネノ'; |
||
1807 | $this->assertEquals($expected, $result); |
||
1808 | |||
1809 | $string = 'Ĥēĺļŏ, Ŵőřļď!'; |
||
1810 | $find = 'Ő'; |
||
1811 | $result = Multibyte::stristr($string, $find); |
||
1812 | $expected = 'őřļď!'; |
||
1813 | $this->assertEquals($expected, $result); |
||
1814 | |||
1815 | $string = 'Ĥēĺļŏ, Ŵőřļď!'; |
||
1816 | $find = 'Ő'; |
||
1817 | $result = Multibyte::stristr($string, $find, true); |
||
1818 | $expected = 'Ĥēĺļŏ, Ŵ'; |
||
1819 | $this->assertEquals($expected, $result); |
||
1820 | |||
1821 | $string = 'Ĥēĺļŏ, Ŵőřļď!'; |
||
1822 | $find = 'ĺļ'; |
||
1823 | $result = Multibyte::stristr($string, $find, true); |
||
1824 | $expected = 'Ĥē'; |
||
1825 | $this->assertEquals($expected, $result); |
||
1826 | |||
1827 | $string = 'Hello, World!'; |
||
1828 | $find = 'O'; |
||
1829 | $result = Multibyte::stristr($string, $find); |
||
1830 | $expected = 'o, World!'; |
||
1831 | $this->assertEquals($expected, $result); |
||
1832 | |||
1833 | $string = 'Hello, World!'; |
||
1834 | $find = 'O'; |
||
1835 | $result = Multibyte::stristr($string, $find, true); |
||
1836 | $expected = 'Hell'; |
||
1837 | $this->assertEquals($expected, $result); |
||
1838 | |||
1839 | $string = 'Hello, World!'; |
||
1840 | $find = 'Wo'; |
||
1841 | $result = Multibyte::stristr($string, $find); |
||
1842 | $expected = 'World!'; |
||
1843 | $this->assertEquals($expected, $result); |
||
1844 | |||
1845 | $string = 'Hello, World!'; |
||
1846 | $find = 'Wo'; |
||
1847 | $result = Multibyte::stristr($string, $find, true); |
||
1848 | $expected = 'Hello, '; |
||
1849 | $this->assertEquals($expected, $result); |
||
1850 | |||
1851 | $string = 'Hello, World!'; |
||
1852 | $find = 'll'; |
||
1853 | $result = Multibyte::stristr($string, $find); |
||
1854 | $expected = 'llo, World!'; |
||
1855 | $this->assertEquals($expected, $result); |
||
1856 | |||
1857 | $string = 'Hello, World!'; |
||
1858 | $find = 'll'; |
||
1859 | $result = Multibyte::stristr($string, $find, true); |
||
1860 | $expected = 'He'; |
||
1861 | $this->assertEquals($expected, $result); |
||
1862 | |||
1863 | $string = 'Hello, World!'; |
||
1864 | $find = 'rld'; |
||
1865 | $result = Multibyte::stristr($string, $find); |
||
1866 | $expected = 'rld!'; |
||
1867 | $this->assertEquals($expected, $result); |
||
1868 | |||
1869 | $string = 'Hello, World!'; |
||
1870 | $find = 'rld'; |
||
1871 | $result = Multibyte::stristr($string, $find, true); |
||
1872 | $expected = 'Hello, Wo'; |
||
1873 | $this->assertEquals($expected, $result); |
||
1874 | |||
1875 | $string = 'čini'; |
||
1876 | $find = 'N'; |
||
1877 | $result = Multibyte::stristr($string, $find); |
||
1878 | $expected = 'ni'; |
||
1879 | $this->assertEquals($expected, $result); |
||
1880 | |||
1881 | $string = 'čini'; |
||
1882 | $find = 'N'; |
||
1883 | $result = Multibyte::stristr($string, $find, true); |
||
1884 | $expected = 'či'; |
||
1885 | $this->assertEquals($expected, $result); |
||
1886 | |||
1887 | $string = 'moći'; |
||
1888 | $find = 'Ć'; |
||
1889 | $result = Multibyte::stristr($string, $find); |
||
1890 | $expected = 'ći'; |
||
1891 | $this->assertEquals($expected, $result); |
||
1892 | |||
1893 | $string = 'moći'; |
||
1894 | $find = 'Ć'; |
||
1895 | $result = Multibyte::stristr($string, $find, true); |
||
1896 | $expected = 'mo'; |
||
1897 | $this->assertEquals($expected, $result); |
||
1898 | |||
1899 | $string = 'državni'; |
||
1900 | $find = 'Ž'; |
||
1901 | $result = Multibyte::stristr($string, $find); |
||
1902 | $expected = 'žavni'; |
||
1903 | $this->assertEquals($expected, $result); |
||
1904 | |||
1905 | $string = 'državni'; |
||
1906 | $find = 'Ž'; |
||
1907 | $result = Multibyte::stristr($string, $find, true); |
||
1908 | $expected = 'dr'; |
||
1909 | $this->assertEquals($expected, $result); |
||
1910 | |||
1911 | $string = '把百度设为首页'; |
||
1912 | $find = '设'; |
||
1913 | $result = Multibyte::stristr($string, $find); |
||
1914 | $expected = '设为首页'; |
||
1915 | $this->assertEquals($expected, $result); |
||
1916 | |||
1917 | $string = '把百度设为首页'; |
||
1918 | $find = '设'; |
||
1919 | $result = Multibyte::stristr($string, $find, true); |
||
1920 | $expected = '把百度'; |
||
1921 | $this->assertEquals($expected, $result); |
||
1922 | |||
1923 | $string = '一二三周永龍'; |
||
1924 | $find = '周'; |
||
1925 | $result = Multibyte::stristr($string, $find); |
||
1926 | $expected = '周永龍'; |
||
1927 | $this->assertEquals($expected, $result); |
||
1928 | |||
1929 | $string = '一二三周永龍'; |
||
1930 | $find = '周'; |
||
1931 | $result = Multibyte::stristr($string, $find, true); |
||
1932 | $expected = '一二三'; |
||
1933 | $this->assertEquals($expected, $result); |
||
1934 | |||
1935 | $string = '一二三周永龍'; |
||
1936 | $find = '二周'; |
||
1937 | $result = Multibyte::stristr($string, $find); |
||
1938 | $expected = false; |
||
1939 | $this->assertEquals($expected, $result); |
||
1940 | } |
||
1941 | |||
1942 | /**
|
||
1943 | * testUsingMbStrlen method
|
||
1944 | *
|
||
1945 | * @return void
|
||
1946 | */
|
||
1947 | public function testUsingMbStrlen() { |
||
1948 | $string = 'ABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789'; |
||
1949 | $result = mb_strlen($string); |
||
1950 | $expected = 36; |
||
1951 | $this->assertEquals($expected, $result); |
||
1952 | |||
1953 | $string = 'ÀÁÂÃÄÅÆÇÈÉÊËÌÍÎÏÐÑÒÓÔÕÖØÙÚÛÜÝÞ'; |
||
1954 | $result = mb_strlen($string); |
||
1955 | $expected = 30; |
||
1956 | $this->assertEquals($expected, $result); |
||
1957 | |||
1958 | $string = 'ĀĂĄĆĈĊČĎĐĒĔĖĘĚĜĞĠĢĤĦĨĪĬĮIJĴĶĹĻĽĿŁŃŅŇŊŌŎŐŒŔŖŘŚŜŞŠŢŤŦŨŪŬŮŰŲŴŶŹŻŽ'; |
||
1959 | $result = mb_strlen($string); |
||
1960 | $expected = 61; |
||
1961 | $this->assertEquals($expected, $result); |
||
1962 | |||
1963 | $string = '!"#$%&\'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~'; |
||
1964 | $result = mb_strlen($string); |
||
1965 | $expected = 94; |
||
1966 | $this->assertEquals($expected, $result); |
||
1967 | |||
1968 | $string = '¡¢£¤¥¦§¨©ª«¬®¯°±²³´µ¶·¸¹º»¼½¾¿ÀÁÂÃÄÅÆÇÈ'; |
||
1969 | $result = mb_strlen($string); |
||
1970 | $expected = 40; |
||
1971 | $this->assertEquals($expected, $result); |
||
1972 | |||
1973 | $string = 'ÉÊËÌÍÎÏÐÑÒÓÔÕÖ×ØÙÚÛÜÝÞßàáâãäåæçèéêëìíîïðñòóôõö÷øùúûüýþÿĀāĂ㥹ĆćĈĉĊċČčĎďĐđĒēĔĕĖėĘęĚěĜĝĞğĠġĢģĤĥĦħĨĩĪīĬ'; |
||
1974 | $result = mb_strlen($string); |
||
1975 | $expected = 100; |
||
1976 | $this->assertEquals($expected, $result); |
||
1977 | |||
1978 | $string = 'ĭĮįİıIJijĴĵĶķĸĹĺĻļĽľĿŀŁłŃńŅņŇňʼnŊŋŌōŎŏŐőŒœŔŕŖŗŘřŚśŜŝŞşŠšŢţŤťŦŧŨũŪūŬŭŮůŰűŲųŴŵŶŷŸŹźŻżŽžſƀƁƂƃƄƅƆƇƈƉƊƋƌƍƎƏƐ'; |
||
1979 | $result = mb_strlen($string); |
||
1980 | $expected = 100; |
||
1981 | $this->assertEquals($expected, $result); |
||
1982 | |||
1983 | $string = 'ƑƒƓƔƕƖƗƘƙƚƛƜƝƞƟƠơƢƣƤƥƦƧƨƩƪƫƬƭƮƯưƱƲƳƴƵƶƷƸƹƺƻƼƽƾƿǀǁǂǃDŽDždžLJLjljNJNjnjǍǎǏǐǑǒǓǔǕǖǗǘǙǚǛǜǝǞǟǠǡǢǣǤǥǦǧǨǩǪǫǬǭǮǯǰDZDzdzǴ'; |
||
1984 | $result = mb_strlen($string); |
||
1985 | $expected = 100; |
||
1986 | $this->assertEquals($expected, $result); |
||
1987 | |||
1988 | $string = 'əɚɛɜɝɞɟɠɡɢɣɤɥɦɧɨɩɪɫɬɭɮɯɰɱɲɳɴɵɶɷɸɹɺɻɼɽɾɿʀʁʂʃʄʅʆʇʈʉʊʋʌʍʎʏʐʑʒʓʔʕʖʗʘʙʚʛʜʝʞʟʠʡʢʣʤʥʦʧʨʩʪʫʬʭʮʯʰʱʲʳʴʵʶʷʸʹʺʻʼ'; |
||
1989 | $result = mb_strlen($string); |
||
1990 | $expected = 100; |
||
1991 | $this->assertEquals($expected, $result); |
||
1992 | |||
1993 | $string = 'ЀЁЂЃЄЅІЇЈЉЊЋЌЍЎЏАБВГДЕЖЗИЙКЛ'; |
||
1994 | $result = mb_strlen($string); |
||
1995 | $expected = 28; |
||
1996 | $this->assertEquals($expected, $result); |
||
1997 | |||
1998 | $string = 'МНОПРСТУФХЦЧШЩЪЫЬЭЮЯабвгдежзийклмнопрстуфхцчшщъыь'; |
||
1999 | $result = mb_strlen($string); |
||
2000 | $expected = 49; |
||
2001 | $this->assertEquals($expected, $result); |
||
2002 | |||
2003 | $string = 'فقكلمنهوىيًٌٍَُ'; |
||
2004 | $result = mb_strlen($string); |
||
2005 | $expected = 15; |
||
2006 | $this->assertEquals($expected, $result); |
||
2007 | |||
2008 | $string = '✰✱✲✳✴✵✶✷✸✹✺✻✼✽✾✿❀❁❂❃❄❅❆❇❈❉❊❋❌❍❎❏❐❑❒❓❔❕❖❗❘❙❚❛❜❝❞'; |
||
2009 | $result = mb_strlen($string); |
||
2010 | $expected = 47; |
||
2011 | $this->assertEquals($expected, $result); |
||
2012 | |||
2013 | $string = '⺀⺁⺂⺃⺄⺅⺆⺇⺈⺉⺊⺋⺌⺍⺎⺏⺐⺑⺒⺓⺔⺕⺖⺗⺘⺙⺛⺜⺝⺞⺟⺠⺡⺢⺣⺤⺥⺦⺧⺨⺩⺪⺫⺬⺭⺮⺯⺰⺱⺲⺳⺴⺵⺶⺷⺸⺹⺺⺻⺼⺽⺾⺿⻀⻁⻂⻃⻄⻅⻆⻇⻈⻉⻊⻋⻌⻍⻎⻏⻐⻑⻒⻓⻔⻕⻖⻗⻘⻙⻚⻛⻜⻝⻞⻟⻠'; |
||
2014 | $result = mb_strlen($string); |
||
2015 | $expected = 96; |
||
2016 | $this->assertEquals($expected, $result); |
||
2017 | |||
2018 | $string = '⽅⽆⽇⽈⽉⽊⽋⽌⽍⽎⽏⽐⽑⽒⽓⽔⽕⽖⽗⽘⽙⽚⽛⽜⽝⽞⽟⽠⽡⽢⽣⽤⽥⽦⽧⽨⽩⽪⽫⽬⽭⽮⽯⽰⽱⽲⽳⽴⽵⽶⽷⽸⽹⽺⽻⽼⽽⽾⽿'; |
||
2019 | $result = mb_strlen($string); |
||
2020 | $expected = 59; |
||
2021 | $this->assertEquals($expected, $result); |
||
2022 | |||
2023 | $string = '눡눢눣눤눥눦눧눨눩눪눫눬눭눮눯눰눱눲눳눴눵눶눷눸눹눺눻눼눽눾눿뉀뉁뉂뉃뉄뉅뉆뉇뉈뉉뉊뉋뉌뉍뉎뉏뉐뉑뉒뉓뉔뉕뉖뉗뉘뉙뉚뉛뉜뉝뉞뉟뉠뉡뉢뉣뉤뉥뉦뉧뉨뉩뉪뉫뉬뉭뉮뉯뉰뉱뉲뉳뉴뉵뉶뉷뉸뉹뉺뉻뉼뉽뉾뉿늀늁늂늃늄'; |
||
2024 | $result = mb_strlen($string); |
||
2025 | $expected = 100; |
||
2026 | $this->assertEquals($expected, $result); |
||
2027 | |||
2028 | $string = 'ﹰﹱﹲﹳﹴﹶﹷﹸﹹﹺﹻﹼﹽﹾﹿﺀﺁﺂﺃﺄﺅﺆﺇﺈﺉﺊﺋﺌﺍﺎﺏﺐﺑﺒﺓﺔﺕﺖﺗﺘﺙﺚﺛﺜﺝﺞﺟﺠﺡﺢﺣﺤﺥﺦﺧﺨﺩﺪﺫﺬﺭﺮﺯﺰ'; |
||
2029 | $result = mb_strlen($string); |
||
2030 | $expected = 65; |
||
2031 | $this->assertEquals($expected, $result); |
||
2032 | |||
2033 | $string = 'ﺱﺲﺳﺴﺵﺶﺷﺸﺹﺺﺻﺼﺽﺾﺿﻀﻁﻂﻃﻄﻅﻆﻇﻈﻉﻊﻋﻌﻍﻎﻏﻐﻑﻒﻓﻔﻕﻖﻗﻘﻙﻚﻛﻜﻝﻞﻟﻠﻡﻢﻣﻤﻥﻦﻧﻨﻩﻪﻫﻬﻭﻮﻯﻰﻱﻲﻳﻴﻵﻶﻷﻸﻹﻺﻻﻼ'; |
||
2034 | $result = mb_strlen($string); |
||
2035 | $expected = 76; |
||
2036 | $this->assertEquals($expected, $result); |
||
2037 | |||
2038 | $string = 'abcdefghijklmnopqrstuvwxyz'; |
||
2039 | $result = mb_strlen($string); |
||
2040 | $expected = 26; |
||
2041 | $this->assertEquals($expected, $result); |
||
2042 | |||
2043 | $string = '。「」、・ヲァィゥェォャュョッーアイウエオカキク'; |
||
2044 | $result = mb_strlen($string); |
||
2045 | $expected = 24; |
||
2046 | $this->assertEquals($expected, $result); |
||
2047 | |||
2048 | $string = 'ケコサシスセソタチツテトナニヌネノハヒフヘホマミムメモヤユヨラリルレロワン゙'; |
||
2049 | $result = mb_strlen($string); |
||
2050 | $expected = 38; |
||
2051 | $this->assertEquals($expected, $result); |
||
2052 | |||
2053 | $string = 'Ĥēĺļŏ, Ŵőřļď!'; |
||
2054 | $result = mb_strlen($string); |
||
2055 | $expected = 13; |
||
2056 | $this->assertEquals($expected, $result); |
||
2057 | |||
2058 | $string = 'Hello, World!'; |
||
2059 | $result = mb_strlen($string); |
||
2060 | $expected = 13; |
||
2061 | $this->assertEquals($expected, $result); |
||
2062 | |||
2063 | $string = 'čini'; |
||
2064 | $result = mb_strlen($string); |
||
2065 | $expected = 4; |
||
2066 | $this->assertEquals($expected, $result); |
||
2067 | |||
2068 | $string = 'moći'; |
||
2069 | $result = mb_strlen($string); |
||
2070 | $expected = 4; |
||
2071 | $this->assertEquals($expected, $result); |
||
2072 | |||
2073 | $string = 'državni'; |
||
2074 | $result = mb_strlen($string); |
||
2075 | $expected = 7; |
||
2076 | $this->assertEquals($expected, $result); |
||
2077 | |||
2078 | $string = '把百度设为首页'; |
||
2079 | $result = mb_strlen($string); |
||
2080 | $expected = 7; |
||
2081 | $this->assertEquals($expected, $result); |
||
2082 | |||
2083 | $string = '一二三周永龍'; |
||
2084 | $result = mb_strlen($string); |
||
2085 | $expected = 6; |
||
2086 | $this->assertEquals($expected, $result); |
||
2087 | } |
||
2088 | |||
2089 | /**
|
||
2090 | * testMultibyteStrlen method
|
||
2091 | *
|
||
2092 | * @return void
|
||
2093 | */
|
||
2094 | public function testMultibyteStrlen() { |
||
2095 | $string = 'ABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789'; |
||
2096 | $result = Multibyte::strlen($string); |
||
2097 | $expected = 36; |
||
2098 | $this->assertEquals($expected, $result); |
||
2099 | |||
2100 | $string = 'ÀÁÂÃÄÅÆÇÈÉÊËÌÍÎÏÐÑÒÓÔÕÖØÙÚÛÜÝÞ'; |
||
2101 | $result = Multibyte::strlen($string); |
||
2102 | $expected = 30; |
||
2103 | $this->assertEquals($expected, $result); |
||
2104 | |||
2105 | $string = 'ĀĂĄĆĈĊČĎĐĒĔĖĘĚĜĞĠĢĤĦĨĪĬĮIJĴĶĹĻĽĿŁŃŅŇŊŌŎŐŒŔŖŘŚŜŞŠŢŤŦŨŪŬŮŰŲŴŶŹŻŽ'; |
||
2106 | $result = Multibyte::strlen($string); |
||
2107 | $expected = 61; |
||
2108 | $this->assertEquals($expected, $result); |
||
2109 | |||
2110 | $string = '!"#$%&\'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~'; |
||
2111 | $result = Multibyte::strlen($string); |
||
2112 | $expected = 94; |
||
2113 | $this->assertEquals($expected, $result); |
||
2114 | |||
2115 | $string = '¡¢£¤¥¦§¨©ª«¬®¯°±²³´µ¶·¸¹º»¼½¾¿ÀÁÂÃÄÅÆÇÈ'; |
||
2116 | $result = Multibyte::strlen($string); |
||
2117 | $expected = 40; |
||
2118 | $this->assertEquals($expected, $result); |
||
2119 | |||
2120 | $string = 'ÉÊËÌÍÎÏÐÑÒÓÔÕÖ×ØÙÚÛÜÝÞßàáâãäåæçèéêëìíîïðñòóôõö÷øùúûüýþÿĀāĂ㥹ĆćĈĉĊċČčĎďĐđĒēĔĕĖėĘęĚěĜĝĞğĠġĢģĤĥĦħĨĩĪīĬ'; |
||
2121 | $result = Multibyte::strlen($string); |
||
2122 | $expected = 100; |
||
2123 | $this->assertEquals($expected, $result); |
||
2124 | |||
2125 | $string = 'ĭĮįİıIJijĴĵĶķĸĹĺĻļĽľĿŀŁłŃńŅņŇňʼnŊŋŌōŎŏŐőŒœŔŕŖŗŘřŚśŜŝŞşŠšŢţŤťŦŧŨũŪūŬŭŮůŰűŲųŴŵŶŷŸŹźŻżŽžſƀƁƂƃƄƅƆƇƈƉƊƋƌƍƎƏƐ'; |
||
2126 | $result = Multibyte::strlen($string); |
||
2127 | $expected = 100; |
||
2128 | $this->assertEquals($expected, $result); |
||
2129 | |||
2130 | $string = 'ƑƒƓƔƕƖƗƘƙƚƛƜƝƞƟƠơƢƣƤƥƦƧƨƩƪƫƬƭƮƯưƱƲƳƴƵƶƷƸƹƺƻƼƽƾƿǀǁǂǃDŽDždžLJLjljNJNjnjǍǎǏǐǑǒǓǔǕǖǗǘǙǚǛǜǝǞǟǠǡǢǣǤǥǦǧǨǩǪǫǬǭǮǯǰDZDzdzǴ'; |
||
2131 | $result = Multibyte::strlen($string); |
||
2132 | $expected = 100; |
||
2133 | $this->assertEquals($expected, $result); |
||
2134 | |||
2135 | $string = 'əɚɛɜɝɞɟɠɡɢɣɤɥɦɧɨɩɪɫɬɭɮɯɰɱɲɳɴɵɶɷɸɹɺɻɼɽɾɿʀʁʂʃʄʅʆʇʈʉʊʋʌʍʎʏʐʑʒʓʔʕʖʗʘʙʚʛʜʝʞʟʠʡʢʣʤʥʦʧʨʩʪʫʬʭʮʯʰʱʲʳʴʵʶʷʸʹʺʻʼ'; |
||
2136 | $result = Multibyte::strlen($string); |
||
2137 | $expected = 100; |
||
2138 | $this->assertEquals($expected, $result); |
||
2139 | |||
2140 | $string = 'ЀЁЂЃЄЅІЇЈЉЊЋЌЍЎЏАБВГДЕЖЗИЙКЛ'; |
||
2141 | $result = Multibyte::strlen($string); |
||
2142 | $expected = 28; |
||
2143 | $this->assertEquals($expected, $result); |
||
2144 | |||
2145 | $string = 'МНОПРСТУФХЦЧШЩЪЫЬЭЮЯабвгдежзийклмнопрстуфхцчшщъыь'; |
||
2146 | $result = Multibyte::strlen($string); |
||
2147 | $expected = 49; |
||
2148 | $this->assertEquals($expected, $result); |
||
2149 | |||
2150 | $string = 'فقكلمنهوىيًٌٍَُ'; |
||
2151 | $result = Multibyte::strlen($string); |
||
2152 | $expected = 15; |
||
2153 | $this->assertEquals($expected, $result); |
||
2154 | |||
2155 | $string = '✰✱✲✳✴✵✶✷✸✹✺✻✼✽✾✿❀❁❂❃❄❅❆❇❈❉❊❋❌❍❎❏❐❑❒❓❔❕❖❗❘❙❚❛❜❝❞'; |
||
2156 | $result = Multibyte::strlen($string); |
||
2157 | $expected = 47; |
||
2158 | $this->assertEquals($expected, $result); |
||
2159 | |||
2160 | $string = '⺀⺁⺂⺃⺄⺅⺆⺇⺈⺉⺊⺋⺌⺍⺎⺏⺐⺑⺒⺓⺔⺕⺖⺗⺘⺙⺛⺜⺝⺞⺟⺠⺡⺢⺣⺤⺥⺦⺧⺨⺩⺪⺫⺬⺭⺮⺯⺰⺱⺲⺳⺴⺵⺶⺷⺸⺹⺺⺻⺼⺽⺾⺿⻀⻁⻂⻃⻄⻅⻆⻇⻈⻉⻊⻋⻌⻍⻎⻏⻐⻑⻒⻓⻔⻕⻖⻗⻘⻙⻚⻛⻜⻝⻞⻟⻠'; |
||
2161 | $result = Multibyte::strlen($string); |
||
2162 | $expected = 96; |
||
2163 | $this->assertEquals($expected, $result); |
||
2164 | |||
2165 | $string = '⽅⽆⽇⽈⽉⽊⽋⽌⽍⽎⽏⽐⽑⽒⽓⽔⽕⽖⽗⽘⽙⽚⽛⽜⽝⽞⽟⽠⽡⽢⽣⽤⽥⽦⽧⽨⽩⽪⽫⽬⽭⽮⽯⽰⽱⽲⽳⽴⽵⽶⽷⽸⽹⽺⽻⽼⽽⽾⽿'; |
||
2166 | $result = Multibyte::strlen($string); |
||
2167 | $expected = 59; |
||
2168 | $this->assertEquals($expected, $result); |
||
2169 | |||
2170 | $string = '눡눢눣눤눥눦눧눨눩눪눫눬눭눮눯눰눱눲눳눴눵눶눷눸눹눺눻눼눽눾눿뉀뉁뉂뉃뉄뉅뉆뉇뉈뉉뉊뉋뉌뉍뉎뉏뉐뉑뉒뉓뉔뉕뉖뉗뉘뉙뉚뉛뉜뉝뉞뉟뉠뉡뉢뉣뉤뉥뉦뉧뉨뉩뉪뉫뉬뉭뉮뉯뉰뉱뉲뉳뉴뉵뉶뉷뉸뉹뉺뉻뉼뉽뉾뉿늀늁늂늃늄'; |
||
2171 | $result = Multibyte::strlen($string); |
||
2172 | $expected = 100; |
||
2173 | $this->assertEquals($expected, $result); |
||
2174 | |||
2175 | $string = 'ﹰﹱﹲﹳﹴﹶﹷﹸﹹﹺﹻﹼﹽﹾﹿﺀﺁﺂﺃﺄﺅﺆﺇﺈﺉﺊﺋﺌﺍﺎﺏﺐﺑﺒﺓﺔﺕﺖﺗﺘﺙﺚﺛﺜﺝﺞﺟﺠﺡﺢﺣﺤﺥﺦﺧﺨﺩﺪﺫﺬﺭﺮﺯﺰ'; |
||
2176 | $result = Multibyte::strlen($string); |
||
2177 | $expected = 65; |
||
2178 | $this->assertEquals($expected, $result); |
||
2179 | |||
2180 | $string = 'ﺱﺲﺳﺴﺵﺶﺷﺸﺹﺺﺻﺼﺽﺾﺿﻀﻁﻂﻃﻄﻅﻆﻇﻈﻉﻊﻋﻌﻍﻎﻏﻐﻑﻒﻓﻔﻕﻖﻗﻘﻙﻚﻛﻜﻝﻞﻟﻠﻡﻢﻣﻤﻥﻦﻧﻨﻩﻪﻫﻬﻭﻮﻯﻰﻱﻲﻳﻴﻵﻶﻷﻸﻹﻺﻻﻼ'; |
||
2181 | $result = Multibyte::strlen($string); |
||
2182 | $expected = 76; |
||
2183 | $this->assertEquals($expected, $result); |
||
2184 | |||
2185 | $string = 'abcdefghijklmnopqrstuvwxyz'; |
||
2186 | $result = Multibyte::strlen($string); |
||
2187 | $expected = 26; |
||
2188 | $this->assertEquals($expected, $result); |
||
2189 | |||
2190 | $string = '。「」、・ヲァィゥェォャュョッーアイウエオカキク'; |
||
2191 | $result = Multibyte::strlen($string); |
||
2192 | $expected = 24; |
||
2193 | $this->assertEquals($expected, $result); |
||
2194 | |||
2195 | $string = 'ケコサシスセソタチツテトナニヌネノハヒフヘホマミムメモヤユヨラリルレロワン゙'; |
||
2196 | $result = Multibyte::strlen($string); |
||
2197 | $expected = 38; |
||
2198 | $this->assertEquals($expected, $result); |
||
2199 | |||
2200 | $string = 'Ĥēĺļŏ, Ŵőřļď!'; |
||
2201 | $result = Multibyte::strlen($string); |
||
2202 | $expected = 13; |
||
2203 | $this->assertEquals($expected, $result); |
||
2204 | |||
2205 | $string = 'Hello, World!'; |
||
2206 | $result = Multibyte::strlen($string); |
||
2207 | $expected = 13; |
||
2208 | $this->assertEquals($expected, $result); |
||
2209 | |||
2210 | $string = 'čini'; |
||
2211 | $result = Multibyte::strlen($string); |
||
2212 | $expected = 4; |
||
2213 | $this->assertEquals($expected, $result); |
||
2214 | |||
2215 | $string = 'moći'; |
||
2216 | $result = Multibyte::strlen($string); |
||
2217 | $expected = 4; |
||
2218 | $this->assertEquals($expected, $result); |
||
2219 | |||
2220 | $string = 'državni'; |
||
2221 | $result = Multibyte::strlen($string); |
||
2222 | $expected = 7; |
||
2223 | $this->assertEquals($expected, $result); |
||
2224 | |||
2225 | $string = '把百度设为首页'; |
||
2226 | $result = Multibyte::strlen($string); |
||
2227 | $expected = 7; |
||
2228 | $this->assertEquals($expected, $result); |
||
2229 | |||
2230 | $string = '一二三周永龍'; |
||
2231 | $result = Multibyte::strlen($string); |
||
2232 | $expected = 6; |
||
2233 | $this->assertEquals($expected, $result); |
||
2234 | } |
||
2235 | |||
2236 | /**
|
||
2237 | * testUsingMbStrpos method
|
||
2238 | *
|
||
2239 | * @return void
|
||
2240 | */
|
||
2241 | public function testUsingMbStrpos() { |
||
2242 | $string = 'ABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789'; |
||
2243 | $find = 'F'; |
||
2244 | $result = mb_strpos($string, $find); |
||
2245 | $expected = 5; |
||
2246 | $this->assertEquals($expected, $result); |
||
2247 | |||
2248 | $string = 'ABCDEFGHIJKLMNOPQFRSTUVWXYZ0123456789'; |
||
2249 | $find = 'F'; |
||
2250 | $result = mb_strpos($string, $find, 6); |
||
2251 | $expected = 17; |
||
2252 | $this->assertEquals($expected, $result); |
||
2253 | |||
2254 | $string = 'ÀÁÂÃÄÅÆÇÈÉÊËÌÍÎÏÐÑÒÓÔÕÖØÙÚÛÜÝÞ'; |
||
2255 | $find = 'Å'; |
||
2256 | $result = mb_strpos($string, $find); |
||
2257 | $expected = 5; |
||
2258 | $this->assertEquals($expected, $result); |
||
2259 | |||
2260 | $string = 'ÀÁÂÃÄÅÆÇÈÉÊËÌÍÎÏÐÑÒÓÔÕÖØÅÙÚÛÜÝÞ'; |
||
2261 | $find = 'Å'; |
||
2262 | $result = mb_strpos($string, $find, 6); |
||
2263 | $expected = 24; |
||
2264 | $this->assertEquals($expected, $result); |
||
2265 | |||
2266 | $string = 'ĀĂĄĆĈĊČĎĐĒĔĖĘĚĜĞĠĢĤĦĨĪĬĮIJĴĶĹĻĽĿŁŃŅŇŊŌŎŐŒŔŖŘŚŜŞŠŢŤŦŨŪŬŮŰŲŴŶŹŻŽ'; |
||
2267 | $find = 'Ċ'; |
||
2268 | $result = mb_strpos($string, $find); |
||
2269 | $expected = 5; |
||
2270 | $this->assertEquals($expected, $result); |
||
2271 | |||
2272 | $string = 'ĀĂĄĆĈĊČĎĐĒĔĖĘĚĜĞĠĢĤĦĨĪĬĮIJĴĶĹĻĽĿŁĊŃŅŇŊŌŎŐŒŔŖŘŚŜŞŠŢŤŦŨŪŬŮŰŲŴŶŹŻŽ'; |
||
2273 | $find = 'Ċ'; |
||
2274 | $result = mb_strpos($string, $find, 6); |
||
2275 | $expected = 32; |
||
2276 | $this->assertEquals($expected, $result); |
||
2277 | |||
2278 | $string = '!"#$%&\'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~'; |
||
2279 | $find = 'F'; |
||
2280 | $result = mb_strpos($string, $find); |
||
2281 | $expected = 37; |
||
2282 | $this->assertEquals($expected, $result); |
||
2283 | |||
2284 | $string = '¡¢£¤¥¦§¨©ª«¬®¯°±²³´µ¶·¸¹º»¼½¾¿ÀÁÂÃÄÅÆÇÈ'; |
||
2285 | $find = 'µ'; |
||
2286 | $result = mb_strpos($string, $find); |
||
2287 | $expected = 20; |
||
2288 | $this->assertEquals($expected, $result); |
||
2289 | |||
2290 | $string = 'ÉÊËÌÍÎÏÐÑÒÓÔÕÖ×ØÙÚÛÜÝÞßàáâãäåæçèéêëìíîïðñòóôõö÷øùúûüýþÿĀāĂ㥹ĆćĈĉĊċČčĎďĐđĒēĔĕĖėĘęĚěĜĝĞğĠġĢģĤĥĦħĨĩĪīĬ'; |
||
2291 | $find = 'é'; |
||
2292 | $result = mb_strpos($string, $find); |
||
2293 | $expected = 32; |
||
2294 | $this->assertEquals($expected, $result); |
||
2295 | |||
2296 | $string = 'ĭĮįİıIJijĴĵĶķĸĹĺĻļĽľĿŀŁłŃńŅņŇňʼnŊŋŌōŎŏŐőŒœŔŕŖŗŘřŚśŜŝŞşŠšŢţŤťŦŧŨũŪūŬŭŮůŰűŲųŴŵŶŷŸŹźŻżŽžſƀƁƂƃƄƅƆƇƈƉƊƋƌƍƎƏƐ'; |
||
2297 | $find = 'Ņ'; |
||
2298 | $result = mb_strpos($string, $find); |
||
2299 | $expected = 24; |
||
2300 | $this->assertEquals($expected, $result); |
||
2301 | |||
2302 | $string = 'ƑƒƓƔƕƖƗƘƙƚƛƜƝƞƟƠơƢƣƤƥƦƧƨƩƪƫƬƭƮƯưƱƲƳƴƵƶƷƸƹƺƻƼƽƾƿǀǁǂǃDŽDždžLJLjljNJNjnjǍǎǏǐǑǒǓǔǕǖǗǘǙǚǛǜǝǞǟǠǡǢǣǤǥǦǧǨǩǪǫǬǭǮǯǰDZDzdzǴ'; |
||
2303 | $find = 'Ƹ'; |
||
2304 | $result = mb_strpos($string, $find); |
||
2305 | $expected = 39; |
||
2306 | $this->assertEquals($expected, $result); |
||
2307 | |||
2308 | $string = 'ƑƒƓƔƕƖƗƘƙƚƛƜƝƞƟƠơƢƣƤƥƦƧƨƩƪƫƬƭƮƯưƱƲƳƴƵƶƷƸƹƺƻƼƽƾƿǀǁǂǃDŽDždžLJLjljNJNjnjǍǎǏǐǑǒǓǔǕǖǗǘǙǚǛǜǝǞǟǠǡǢǣǤǥǦǧǨǩǪǫǬǭǮǯǰDZDzdzǴ'; |
||
2309 | $find = 'ƹ'; |
||
2310 | $result = mb_strpos($string, $find); |
||
2311 | $expected = 40; |
||
2312 | $this->assertEquals($expected, $result); |
||
2313 | |||
2314 | $string = 'əɚɛɜɝɞɟɠɡɢɣɤɥɦɧɨɩɪɫɬɭɮɯɰɱɲɳɴɵɶɷɸɹɺɻɼɽɾɿʀʁʂʃʄʅʆʇʈʉʊʋʌʍʎʏʐʑʒʓʔʕʖʗʘʙʚʛʜʝʞʟʠʡʢʣʤʥʦʧʨʩʪʫʬʭʮʯʰʱʲʳʴʵʶʷʸʹʺʻʼ'; |
||
2315 | $find = 'ʀ'; |
||
2316 | $result = mb_strpos($string, $find); |
||
2317 | $expected = 39; |
||
2318 | $this->assertEquals($expected, $result); |
||
2319 | |||
2320 | $string = 'ЀЁЂЃЄЅІЇЈЉЊЋЌЍЎЏАБВГДЕЖЗИЙКЛ'; |
||
2321 | $find = 'Ї'; |
||
2322 | $result = mb_strpos($string, $find); |
||
2323 | $expected = 7; |
||
2324 | $this->assertEquals($expected, $result); |
||
2325 | |||
2326 | $string = 'МНОПРСТУФХЦЧШЩЪЫЬЭЮЯабвгдежзийклмнопрстуфхцчшщъыь'; |
||
2327 | $find = 'Р'; |
||
2328 | $result = mb_strpos($string, $find); |
||
2329 | $expected = 4; |
||
2330 | $this->assertEquals($expected, $result); |
||
2331 | |||
2332 | $string = 'МНОПРСТУФХЦЧШЩЪЫЬЭЮЯабвгдежзийклмнопрстуфхцчшщъыь'; |
||
2333 | $find = 'р'; |
||
2334 | $result = mb_strpos($string, $find, 5); |
||
2335 | $expected = 36; |
||
2336 | $this->assertEquals($expected, $result); |
||
2337 | |||
2338 | $string = 'فقكلمنهوىيًٌٍَُ'; |
||
2339 | $find = 'ن'; |
||
2340 | $result = mb_strpos($string, $find); |
||
2341 | $expected = 5; |
||
2342 | $this->assertEquals($expected, $result); |
||
2343 | |||
2344 | $string = '✰✱✲✳✴✵✶✷✸✹✺✻✼✽✾✿❀❁❂❃❄❅❆❇❈❉❊❋❌❍❎❏❐❑❒❓❔❕❖❗❘❙❚❛❜❝❞'; |
||
2345 | $find = '✿'; |
||
2346 | $result = mb_strpos($string, $find); |
||
2347 | $expected = 15; |
||
2348 | $this->assertEquals($expected, $result); |
||
2349 | |||
2350 | $string = '⺀⺁⺂⺃⺄⺅⺆⺇⺈⺉⺊⺋⺌⺍⺎⺏⺐⺑⺒⺓⺔⺕⺖⺗⺘⺙⺛⺜⺝⺞⺟⺠⺡⺢⺣⺤⺥⺦⺧⺨⺩⺪⺫⺬⺭⺮⺯⺰⺱⺲⺳⺴⺵⺶⺷⺸⺹⺺⺻⺼⺽⺾⺿⻀⻁⻂⻃⻄⻅⻆⻇⻈⻉⻊⻋⻌⻍⻎⻏⻐⻑⻒⻓⻔⻕⻖⻗⻘⻙⻚⻛⻜⻝⻞⻟⻠'; |
||
2351 | $find = '⺐'; |
||
2352 | $result = mb_strpos($string, $find); |
||
2353 | $expected = 16; |
||
2354 | $this->assertEquals($expected, $result); |
||
2355 | |||
2356 | $string = '⽅⽆⽇⽈⽉⽊⽋⽌⽍⽎⽏⽐⽑⽒⽓⽔⽕⽖⽗⽘⽙⽚⽛⽜⽝⽞⽟⽠⽡⽢⽣⽤⽥⽦⽧⽨⽩⽪⽫⽬⽭⽮⽯⽰⽱⽲⽳⽴⽵⽶⽷⽸⽹⽺⽻⽼⽽⽾⽿'; |
||
2357 | $find = '⽤'; |
||
2358 | $result = mb_strpos($string, $find); |
||
2359 | $expected = 31; |
||
2360 | $this->assertEquals($expected, $result); |
||
2361 | |||
2362 | $string = '눡눢눣눤눥눦눧눨눩눪눫눬눭눮눯눰눱눲눳눴눵눶눷눸눹눺눻눼눽눾눿뉀뉁뉂뉃뉄뉅뉆뉇뉈뉉뉊뉋뉌뉍뉎뉏뉐뉑뉒뉓뉔뉕뉖뉗뉘뉙뉚뉛뉜뉝뉞뉟뉠뉡뉢뉣뉤뉥뉦뉧뉨뉩뉪뉫뉬뉭뉮뉯뉰뉱뉲뉳뉴뉵뉶뉷뉸뉹뉺뉻뉼뉽뉾뉿늀늁늂늃늄'; |
||
2363 | $find = '눻'; |
||
2364 | $result = mb_strpos($string, $find); |
||
2365 | $expected = 26; |
||
2366 | $this->assertEquals($expected, $result); |
||
2367 | |||
2368 | $string = 'ﹰﹱﹲﹳﹴﹶﹷﹸﹹﹺﹻﹼﹽﹾﹿﺀﺁﺂﺃﺄﺅﺆﺇﺈﺉﺊﺋﺌﺍﺎﺏﺐﺑﺒﺓﺔﺕﺖﺗﺘﺙﺚﺛﺜﺝﺞﺟﺠﺡﺢﺣﺤﺥﺦﺧﺨﺩﺪﺫﺬﺭﺮﺯﺰ'; |
||
2369 | $find = 'ﺞ'; |
||
2370 | $result = mb_strpos($string, $find); |
||
2371 | $expected = 46; |
||
2372 | $this->assertEquals($expected, $result); |
||
2373 | |||
2374 | $string = 'ﺱﺲﺳﺴﺵﺶﺷﺸﺹﺺﺻﺼﺽﺾﺿﻀﻁﻂﻃﻄﻅﻆﻇﻈﻉﻊﻋﻌﻍﻎﻏﻐﻑﻒﻓﻔﻕﻖﻗﻘﻙﻚﻛﻜﻝﻞﻟﻠﻡﻢﻣﻤﻥﻦﻧﻨﻩﻪﻫﻬﻭﻮﻯﻰﻱﻲﻳﻴﻵﻶﻷﻸﻹﻺﻻﻼ'; |
||
2375 | $find = 'ﻞ'; |
||
2376 | $result = mb_strpos($string, $find); |
||
2377 | $expected = 45; |
||
2378 | $this->assertEquals($expected, $result); |
||
2379 | |||
2380 | $string = 'abcdefghijklmnopqrstuvwxyz'; |
||
2381 | $find = 'k'; |
||
2382 | $result = mb_strpos($string, $find); |
||
2383 | $expected = 10; |
||
2384 | $this->assertEquals($expected, $result); |
||
2385 | |||
2386 | $string = 'abcdefghijklmnopqrstuvwxyz'; |
||
2387 | $find = 'k'; |
||
2388 | $result = mb_strpos($string, $find); |
||
2389 | $expected = 10; |
||
2390 | $this->assertEquals($expected, $result); |
||
2391 | |||
2392 | $string = '。「」、・ヲァィゥェォャュョッーアイウエオカキク'; |
||
2393 | $find = 'ア'; |
||
2394 | $result = mb_strpos($string, $find); |
||
2395 | $expected = 16; |
||
2396 | $this->assertEquals($expected, $result); |
||
2397 | |||
2398 | $string = 'ケコサシスセソタチツテトナニヌネノハヒフヘホマミムメモヤユヨラリルレロワン゙'; |
||
2399 | $find = 'ハ'; |
||
2400 | $result = mb_strpos($string, $find); |
||
2401 | $expected = 17; |
||
2402 | $this->assertEquals($expected, $result); |
||
2403 | |||
2404 | $string = 'Ĥēĺļŏ, Ŵőřļď!'; |
||
2405 | $find = 'ő'; |
||
2406 | $result = mb_strpos($string, $find); |
||
2407 | $expected = 8; |
||
2408 | $this->assertEquals($expected, $result); |
||
2409 | |||
2410 | $string = 'Ĥēĺļŏ, Ŵőřļď!'; |
||
2411 | $find = 'ő'; |
||
2412 | $result = mb_strpos($string, $find); |
||
2413 | $expected = 8; |
||
2414 | $this->assertEquals($expected, $result); |
||
2415 | |||
2416 | $string = 'Ĥēĺļŏ, Ŵőřļď!'; |
||
2417 | $find = 'őř'; |
||
2418 | $result = mb_strpos($string, $find); |
||
2419 | $expected = 8; |
||
2420 | $this->assertEquals($expected, $result); |
||
2421 | |||
2422 | $string = 'Hello, World!'; |
||
2423 | $find = 'o'; |
||
2424 | $result = mb_strpos($string, $find); |
||
2425 | $expected = 4; |
||
2426 | $this->assertEquals($expected, $result); |
||
2427 | |||
2428 | $string = 'Hello, World!'; |
||
2429 | $find = 'o'; |
||
2430 | $result = mb_strpos($string, $find, 5); |
||
2431 | $expected = 8; |
||
2432 | $this->assertEquals($expected, $result); |
||
2433 | |||
2434 | $string = 'čini'; |
||
2435 | $find = 'n'; |
||
2436 | $result = mb_strpos($string, $find); |
||
2437 | $expected = 2; |
||
2438 | $this->assertEquals($expected, $result); |
||
2439 | |||
2440 | $string = 'čini'; |
||
2441 | $find = 'n'; |
||
2442 | $result = mb_strpos($string, $find); |
||
2443 | $expected = 2; |
||
2444 | $this->assertEquals($expected, $result); |
||
2445 | |||
2446 | $string = 'moći'; |
||
2447 | $find = 'ć'; |
||
2448 | $result = mb_strpos($string, $find); |
||
2449 | $expected = 2; |
||
2450 | $this->assertEquals($expected, $result); |
||
2451 | |||
2452 | $string = 'moći'; |
||
2453 | $find = 'ć'; |
||
2454 | $result = mb_strpos($string, $find); |
||
2455 | $expected = 2; |
||
2456 | $this->assertEquals($expected, $result); |
||
2457 | |||
2458 | $string = 'državni'; |
||
2459 | $find = 'ž'; |
||
2460 | $result = mb_strpos($string, $find); |
||
2461 | $expected = 2; |
||
2462 | $this->assertEquals($expected, $result); |
||
2463 | |||
2464 | $string = '把百度设为首页'; |
||
2465 | $find = '设'; |
||
2466 | $result = mb_strpos($string, $find); |
||
2467 | $expected = 3; |
||
2468 | $this->assertEquals($expected, $result); |
||
2469 | |||
2470 | $string = '一二三周永龍'; |
||
2471 | $find = '周'; |
||
2472 | $result = mb_strpos($string, $find); |
||
2473 | $expected = 3; |
||
2474 | $this->assertEquals($expected, $result); |
||
2475 | |||
2476 | $string = '一二三周永龍'; |
||
2477 | $find = '一周'; |
||
2478 | $result = mb_strpos($string, $find); |
||
2479 | $expected = false; |
||
2480 | $this->assertEquals($expected, $result); |
||
2481 | } |
||
2482 | |||
2483 | /**
|
||
2484 | * testMultibyteStrpos method
|
||
2485 | *
|
||
2486 | * @return void
|
||
2487 | */
|
||
2488 | public function testMultibyteStrpos() { |
||
2489 | $string = 'ABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789'; |
||
2490 | $find = 'F'; |
||
2491 | $result = Multibyte::strpos($string, $find); |
||
2492 | $expected = 5; |
||
2493 | $this->assertEquals($expected, $result); |
||
2494 | |||
2495 | $string = 'ABCDEFGHIJKLMNOPQFRSTUVWXYZ0123456789'; |
||
2496 | $find = 'F'; |
||
2497 | $result = Multibyte::strpos($string, $find, 6); |
||
2498 | $expected = 17; |
||
2499 | $this->assertEquals($expected, $result); |
||
2500 | |||
2501 | $string = 'ÀÁÂÃÄÅÆÇÈÉÊËÌÍÎÏÐÑÒÓÔÕÖØÙÚÛÜÝÞ'; |
||
2502 | $find = 'Å'; |
||
2503 | $result = Multibyte::strpos($string, $find); |
||
2504 | $expected = 5; |
||
2505 | $this->assertEquals($expected, $result); |
||
2506 | |||
2507 | $string = 'ÀÁÂÃÄÅÆÇÈÉÊËÌÍÎÏÐÑÒÓÔÕÖØÅÙÚÛÜÝÞ'; |
||
2508 | $find = 'Å'; |
||
2509 | $result = Multibyte::strpos($string, $find, 6); |
||
2510 | $expected = 24; |
||
2511 | $this->assertEquals($expected, $result); |
||
2512 | |||
2513 | $string = 'ĀĂĄĆĈĊČĎĐĒĔĖĘĚĜĞĠĢĤĦĨĪĬĮIJĴĶĹĻĽĿŁŃŅŇŊŌŎŐŒŔŖŘŚŜŞŠŢŤŦŨŪŬŮŰŲŴŶŹŻŽ'; |
||
2514 | $find = 'Ċ'; |
||
2515 | $result = Multibyte::strpos($string, $find); |
||
2516 | $expected = 5; |
||
2517 | $this->assertEquals($expected, $result); |
||
2518 | |||
2519 | $string = 'ĀĂĄĆĈĊČĎĐĒĔĖĘĚĜĞĠĢĤĦĨĪĬĮIJĴĶĹĻĽĿŁĊŃŅŇŊŌŎŐŒŔŖŘŚŜŞŠŢŤŦŨŪŬŮŰŲŴŶŹŻŽ'; |
||
2520 | $find = 'Ċ'; |
||
2521 | $result = Multibyte::strpos($string, $find, 6); |
||
2522 | $expected = 32; |
||
2523 | $this->assertEquals($expected, $result); |
||
2524 | |||
2525 | $string = '!"#$%&\'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~'; |
||
2526 | $find = 'F'; |
||
2527 | $result = Multibyte::strpos($string, $find); |
||
2528 | $expected = 37; |
||
2529 | $this->assertEquals($expected, $result); |
||
2530 | |||
2531 | $string = '¡¢£¤¥¦§¨©ª«¬®¯°±²³´µ¶·¸¹º»¼½¾¿ÀÁÂÃÄÅÆÇÈ'; |
||
2532 | $find = 'µ'; |
||
2533 | $result = Multibyte::strpos($string, $find); |
||
2534 | $expected = 20; |
||
2535 | $this->assertEquals($expected, $result); |
||
2536 | |||
2537 | $string = 'ÉÊËÌÍÎÏÐÑÒÓÔÕÖ×ØÙÚÛÜÝÞßàáâãäåæçèéêëìíîïðñòóôõö÷øùúûüýþÿĀāĂ㥹ĆćĈĉĊċČčĎďĐđĒēĔĕĖėĘęĚěĜĝĞğĠġĢģĤĥĦħĨĩĪīĬ'; |
||
2538 | $find = 'é'; |
||
2539 | $result = Multibyte::strpos($string, $find); |
||
2540 | $expected = 32; |
||
2541 | $this->assertEquals($expected, $result); |
||
2542 | |||
2543 | $string = 'ĭĮįİıIJijĴĵĶķĸĹĺĻļĽľĿŀŁłŃńŅņŇňʼnŊŋŌōŎŏŐőŒœŔŕŖŗŘřŚśŜŝŞşŠšŢţŤťŦŧŨũŪūŬŭŮůŰűŲųŴŵŶŷŸŹźŻżŽžſƀƁƂƃƄƅƆƇƈƉƊƋƌƍƎƏƐ'; |
||
2544 | $find = 'Ņ'; |
||
2545 | $result = Multibyte::strpos($string, $find); |
||
2546 | $expected = 24; |
||
2547 | $this->assertEquals($expected, $result); |
||
2548 | |||
2549 | $string = 'ƑƒƓƔƕƖƗƘƙƚƛƜƝƞƟƠơƢƣƤƥƦƧƨƩƪƫƬƭƮƯưƱƲƳƴƵƶƷƸƹƺƻƼƽƾƿǀǁǂǃDŽDždžLJLjljNJNjnjǍǎǏǐǑǒǓǔǕǖǗǘǙǚǛǜǝǞǟǠǡǢǣǤǥǦǧǨǩǪǫǬǭǮǯǰDZDzdzǴ'; |
||
2550 | $find = 'Ƹ'; |
||
2551 | $result = Multibyte::strpos($string, $find); |
||
2552 | $expected = 39; |
||
2553 | $this->assertEquals($expected, $result); |
||
2554 | |||
2555 | $string = 'ƑƒƓƔƕƖƗƘƙƚƛƜƝƞƟƠơƢƣƤƥƦƧƨƩƪƫƬƭƮƯưƱƲƳƴƵƶƷƸƹƺƻƼƽƾƿǀǁǂǃDŽDždžLJLjljNJNjnjǍǎǏǐǑǒǓǔǕǖǗǘǙǚǛǜǝǞǟǠǡǢǣǤǥǦǧǨǩǪǫǬǭǮǯǰDZDzdzǴ'; |
||
2556 | $find = 'ƹ'; |
||
2557 | $result = Multibyte::strpos($string, $find); |
||
2558 | $expected = 40; |
||
2559 | $this->assertEquals($expected, $result); |
||
2560 | |||
2561 | $string = 'əɚɛɜɝɞɟɠɡɢɣɤɥɦɧɨɩɪɫɬɭɮɯɰɱɲɳɴɵɶɷɸɹɺɻɼɽɾɿʀʁʂʃʄʅʆʇʈʉʊʋʌʍʎʏʐʑʒʓʔʕʖʗʘʙʚʛʜʝʞʟʠʡʢʣʤʥʦʧʨʩʪʫʬʭʮʯʰʱʲʳʴʵʶʷʸʹʺʻʼ'; |
||
2562 | $find = 'ʀ'; |
||
2563 | $result = Multibyte::strpos($string, $find); |
||
2564 | $expected = 39; |
||
2565 | $this->assertEquals($expected, $result); |
||
2566 | |||
2567 | $string = 'ЀЁЂЃЄЅІЇЈЉЊЋЌЍЎЏАБВГДЕЖЗИЙКЛ'; |
||
2568 | $find = 'Ї'; |
||
2569 | $result = Multibyte::strpos($string, $find); |
||
2570 | $expected = 7; |
||
2571 | $this->assertEquals($expected, $result); |
||
2572 | |||
2573 | $string = 'МНОПРСТУФХЦЧШЩЪЫЬЭЮЯабвгдежзийклмнопрстуфхцчшщъыь'; |
||
2574 | $find = 'Р'; |
||
2575 | $result = Multibyte::strpos($string, $find); |
||
2576 | $expected = 4; |
||
2577 | $this->assertEquals($expected, $result); |
||
2578 | |||
2579 | $string = 'МНОПРСТУФХЦЧШЩЪЫЬЭЮЯабвгдежзийклмнопрстуфхцчшщъыь'; |
||
2580 | $find = 'р'; |
||
2581 | $result = Multibyte::strpos($string, $find, 5); |
||
2582 | $expected = 36; |
||
2583 | $this->assertEquals($expected, $result); |
||
2584 | |||
2585 | $string = 'فقكلمنهوىيًٌٍَُ'; |
||
2586 | $find = 'ن'; |
||
2587 | $result = Multibyte::strpos($string, $find); |
||
2588 | $expected = 5; |
||
2589 | $this->assertEquals($expected, $result); |
||
2590 | |||
2591 | $string = '✰✱✲✳✴✵✶✷✸✹✺✻✼✽✾✿❀❁❂❃❄❅❆❇❈❉❊❋❌❍❎❏❐❑❒❓❔❕❖❗❘❙❚❛❜❝❞'; |
||
2592 | $find = '✿'; |
||
2593 | $result = Multibyte::strpos($string, $find); |
||
2594 | $expected = 15; |
||
2595 | $this->assertEquals($expected, $result); |
||
2596 | |||
2597 | $string = '⺀⺁⺂⺃⺄⺅⺆⺇⺈⺉⺊⺋⺌⺍⺎⺏⺐⺑⺒⺓⺔⺕⺖⺗⺘⺙⺛⺜⺝⺞⺟⺠⺡⺢⺣⺤⺥⺦⺧⺨⺩⺪⺫⺬⺭⺮⺯⺰⺱⺲⺳⺴⺵⺶⺷⺸⺹⺺⺻⺼⺽⺾⺿⻀⻁⻂⻃⻄⻅⻆⻇⻈⻉⻊⻋⻌⻍⻎⻏⻐⻑⻒⻓⻔⻕⻖⻗⻘⻙⻚⻛⻜⻝⻞⻟⻠'; |
||
2598 | $find = '⺐'; |
||
2599 | $result = Multibyte::strpos($string, $find); |
||
2600 | $expected = 16; |
||
2601 | $this->assertEquals($expected, $result); |
||
2602 | |||
2603 | $string = '⽅⽆⽇⽈⽉⽊⽋⽌⽍⽎⽏⽐⽑⽒⽓⽔⽕⽖⽗⽘⽙⽚⽛⽜⽝⽞⽟⽠⽡⽢⽣⽤⽥⽦⽧⽨⽩⽪⽫⽬⽭⽮⽯⽰⽱⽲⽳⽴⽵⽶⽷⽸⽹⽺⽻⽼⽽⽾⽿'; |
||
2604 | $find = '⽤'; |
||
2605 | $result = Multibyte::strpos($string, $find); |
||
2606 | $expected = 31; |
||
2607 | $this->assertEquals($expected, $result); |
||
2608 | |||
2609 | $string = '눡눢눣눤눥눦눧눨눩눪눫눬눭눮눯눰눱눲눳눴눵눶눷눸눹눺눻눼눽눾눿뉀뉁뉂뉃뉄뉅뉆뉇뉈뉉뉊뉋뉌뉍뉎뉏뉐뉑뉒뉓뉔뉕뉖뉗뉘뉙뉚뉛뉜뉝뉞뉟뉠뉡뉢뉣뉤뉥뉦뉧뉨뉩뉪뉫뉬뉭뉮뉯뉰뉱뉲뉳뉴뉵뉶뉷뉸뉹뉺뉻뉼뉽뉾뉿늀늁늂늃늄'; |
||
2610 | $find = '눻'; |
||
2611 | $result = Multibyte::strpos($string, $find); |
||
2612 | $expected = 26; |
||
2613 | $this->assertEquals($expected, $result); |
||
2614 | |||
2615 | $string = 'ﹰﹱﹲﹳﹴﹶﹷﹸﹹﹺﹻﹼﹽﹾﹿﺀﺁﺂﺃﺄﺅﺆﺇﺈﺉﺊﺋﺌﺍﺎﺏﺐﺑﺒﺓﺔﺕﺖﺗﺘﺙﺚﺛﺜﺝﺞﺟﺠﺡﺢﺣﺤﺥﺦﺧﺨﺩﺪﺫﺬﺭﺮﺯﺰ'; |
||
2616 | $find = 'ﺞ'; |
||
2617 | $result = Multibyte::strpos($string, $find); |
||
2618 | $expected = 46; |
||
2619 | $this->assertEquals($expected, $result); |
||
2620 | |||
2621 | $string = 'ﺱﺲﺳﺴﺵﺶﺷﺸﺹﺺﺻﺼﺽﺾﺿﻀﻁﻂﻃﻄﻅﻆﻇﻈﻉﻊﻋﻌﻍﻎﻏﻐﻑﻒﻓﻔﻕﻖﻗﻘﻙﻚﻛﻜﻝﻞﻟﻠﻡﻢﻣﻤﻥﻦﻧﻨﻩﻪﻫﻬﻭﻮﻯﻰﻱﻲﻳﻴﻵﻶﻷﻸﻹﻺﻻﻼ'; |
||
2622 | $find = 'ﻞ'; |
||
2623 | $result = Multibyte::strpos($string, $find); |
||
2624 | $expected = 45; |
||
2625 | $this->assertEquals($expected, $result); |
||
2626 | |||
2627 | $string = 'abcdefghijklmnopqrstuvwxyz'; |
||
2628 | $find = 'k'; |
||
2629 | $result = Multibyte::strpos($string, $find); |
||
2630 | $expected = 10; |
||
2631 | $this->assertEquals($expected, $result); |
||
2632 | |||
2633 | $string = 'abcdefghijklmnopqrstuvwxyz'; |
||
2634 | $find = 'k'; |
||
2635 | $result = Multibyte::strpos($string, $find); |
||
2636 | $expected = 10; |
||
2637 | $this->assertEquals($expected, $result); |
||
2638 | |||
2639 | $string = '。「」、・ヲァィゥェォャュョッーアイウエオカキク'; |
||
2640 | $find = 'ア'; |
||
2641 | $result = Multibyte::strpos($string, $find); |
||
2642 | $expected = 16; |
||
2643 | $this->assertEquals($expected, $result); |
||
2644 | |||
2645 | $string = 'ケコサシスセソタチツテトナニヌネノハヒフヘホマミムメモヤユヨラリルレロワン゙'; |
||
2646 | $find = 'ハ'; |
||
2647 | $result = Multibyte::strpos($string, $find); |
||
2648 | $expected = 17; |
||
2649 | $this->assertEquals($expected, $result); |
||
2650 | |||
2651 | $string = 'Ĥēĺļŏ, Ŵőřļď!'; |
||
2652 | $find = 'ő'; |
||
2653 | $result = Multibyte::strpos($string, $find); |
||
2654 | $expected = 8; |
||
2655 | $this->assertEquals($expected, $result); |
||
2656 | |||
2657 | $string = 'Ĥēĺļŏ, Ŵőřļď!'; |
||
2658 | $find = 'ő'; |
||
2659 | $result = Multibyte::strpos($string, $find); |
||
2660 | $expected = 8; |
||
2661 | $this->assertEquals($expected, $result); |
||
2662 | |||
2663 | $string = 'Ĥēĺļŏ, Ŵőřļď!'; |
||
2664 | $find = 'őř'; |
||
2665 | $result = Multibyte::strpos($string, $find); |
||
2666 | $expected = 8; |
||
2667 | $this->assertEquals($expected, $result); |
||
2668 | |||
2669 | $string = 'Hello, World!'; |
||
2670 | $find = 'o'; |
||
2671 | $result = Multibyte::strpos($string, $find); |
||
2672 | $expected = 4; |
||
2673 | $this->assertEquals($expected, $result); |
||
2674 | |||
2675 | $string = 'Hello, World!'; |
||
2676 | $find = 'o'; |
||
2677 | $result = Multibyte::strpos($string, $find, 5); |
||
2678 | $expected = 8; |
||
2679 | $this->assertEquals($expected, $result); |
||
2680 | |||
2681 | $string = 'čini'; |
||
2682 | $find = 'n'; |
||
2683 | $result = Multibyte::strpos($string, $find); |
||
2684 | $expected = 2; |
||
2685 | $this->assertEquals($expected, $result); |
||
2686 | |||
2687 | $string = 'čini'; |
||
2688 | $find = 'n'; |
||
2689 | $result = Multibyte::strpos($string, $find); |
||
2690 | $expected = 2; |
||
2691 | $this->assertEquals($expected, $result); |
||
2692 | |||
2693 | $string = 'moći'; |
||
2694 | $find = 'ć'; |
||
2695 | $result = Multibyte::strpos($string, $find); |
||
2696 | $expected = 2; |
||
2697 | $this->assertEquals($expected, $result); |
||
2698 | |||
2699 | $string = 'moći'; |
||
2700 | $find = 'ć'; |
||
2701 | $result = Multibyte::strpos($string, $find); |
||
2702 | $expected = 2; |
||
2703 | $this->assertEquals($expected, $result); |
||
2704 | |||
2705 | $string = 'državni'; |
||
2706 | $find = 'ž'; |
||
2707 | $result = Multibyte::strpos($string, $find); |
||
2708 | $expected = 2; |
||
2709 | $this->assertEquals($expected, $result); |
||
2710 | |||
2711 | $string = '把百度设为首页'; |
||
2712 | $find = '设'; |
||
2713 | $result = Multibyte::strpos($string, $find); |
||
2714 | $expected = 3; |
||
2715 | $this->assertEquals($expected, $result); |
||
2716 | |||
2717 | $string = '一二三周永龍'; |
||
2718 | $find = '周'; |
||
2719 | $result = Multibyte::strpos($string, $find); |
||
2720 | $expected = 3; |
||
2721 | $this->assertEquals($expected, $result); |
||
2722 | |||
2723 | $string = '一二三周永龍'; |
||
2724 | $find = '一周'; |
||
2725 | $result = Multibyte::strpos($string, $find); |
||
2726 | $expected = false; |
||
2727 | $this->assertEquals($expected, $result); |
||
2728 | } |
||
2729 | |||
2730 | /**
|
||
2731 | * testUsingMbStrrchr method
|
||
2732 | *
|
||
2733 | * @return void
|
||
2734 | */
|
||
2735 | public function testUsingMbStrrchr() { |
||
2736 | $string = 'ABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789'; |
||
2737 | $find = 'F'; |
||
2738 | $result = mb_strrchr($string, $find); |
||
2739 | $expected = 'FGHIJKLMNOPQRSTUVWXYZ0123456789'; |
||
2740 | $this->assertEquals($expected, $result); |
||
2741 | |||
2742 | $string = 'ABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789'; |
||
2743 | $find = 'F'; |
||
2744 | $result = mb_strrchr($string, $find, true); |
||
2745 | $expected = 'ABCDE'; |
||
2746 | $this->assertEquals($expected, $result); |
||
2747 | |||
2748 | $string = 'ÀÁÂÃÄÅÆÇÈÉÊËÌÍÎÏÐÑÒÓÔÕÖØÙÚÛÜÝÞ'; |
||
2749 | $find = 'Å'; |
||
2750 | $result = mb_strrchr($string, $find); |
||
2751 | $expected = 'ÅÆÇÈÉÊËÌÍÎÏÐÑÒÓÔÕÖØÙÚÛÜÝÞ'; |
||
2752 | $this->assertEquals($expected, $result); |
||
2753 | |||
2754 | $string = 'ÀÁÂÃÄÅÆÇÈÉÊËÌÍÎÏÐÑÒÓÔÕÖØÙÚÛÜÝÞ'; |
||
2755 | $find = 'Å'; |
||
2756 | $result = mb_strrchr($string, $find, true); |
||
2757 | $expected = 'ÀÁÂÃÄ'; |
||
2758 | $this->assertEquals($expected, $result); |
||
2759 | |||
2760 | $string = 'ĀĂĄĆĈĊČĎĐĒĔĖĘĚĜĞĠĢĤĦĨĪĬĮIJĴĶĹĻĽĿŁŃŅŇŊŌŎŐŒŔŖŘŚŜŞŠŢŤŦŨŪŬŮŰŲŴŶŹŻŽ'; |
||
2761 | $find = 'Ċ'; |
||
2762 | $result = mb_strrchr($string, $find); |
||
2763 | $expected = 'ĊČĎĐĒĔĖĘĚĜĞĠĢĤĦĨĪĬĮIJĴĶĹĻĽĿŁŃŅŇŊŌŎŐŒŔŖŘŚŜŞŠŢŤŦŨŪŬŮŰŲŴŶŹŻŽ'; |
||
2764 | $this->assertEquals($expected, $result); |
||
2765 | |||
2766 | $string = 'ĀĂĄĆĈĊČĎĐĒĔĖĘĚĜĞĠĢĤĦĨĪĬĮIJĴĶĹĻĽĿŁŃŅŇŊŌŎŐŒŔŖŘŚŜŞŠŢŤŦŨŪŬŮŰŲŴŶŹŻŽ'; |
||
2767 | $find = 'Ċ'; |
||
2768 | $result = mb_strrchr($string, $find, true); |
||
2769 | $expected = 'ĀĂĄĆĈ'; |
||
2770 | $this->assertEquals($expected, $result); |
||
2771 | |||
2772 | $string = '!"#$%&\'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~'; |
||
2773 | $find = 'F'; |
||
2774 | $result = mb_strrchr($string, $find); |
||
2775 | $expected = 'FGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~'; |
||
2776 | $this->assertEquals($expected, $result); |
||
2777 | |||
2778 | $string = '!"#$%&\'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~'; |
||
2779 | $find = 'F'; |
||
2780 | $result = mb_strrchr($string, $find, true); |
||
2781 | $expected = '!"#$%&\'()*+,-./0123456789:;<=>?@ABCDE'; |
||
2782 | $this->assertEquals($expected, $result); |
||
2783 | |||
2784 | $string = '¡¢£¤¥¦§¨©ª«¬®¯°±²³´µ¶·¸¹º»¼½¾¿ÀÁÂÃÄÅÆÇÈ'; |
||
2785 | $find = 'µ'; |
||
2786 | $result = mb_strrchr($string, $find); |
||
2787 | $expected = 'µ¶·¸¹º»¼½¾¿ÀÁÂÃÄÅÆÇÈ'; |
||
2788 | $this->assertEquals($expected, $result); |
||
2789 | |||
2790 | $string = '¡¢£¤¥¦§¨©ª«¬®¯°±²³´µ¶·¸¹º»¼½¾¿ÀÁÂÃÄÅÆÇÈ'; |
||
2791 | $find = 'µ'; |
||
2792 | $result = mb_strrchr($string, $find, true); |
||
2793 | $expected = '¡¢£¤¥¦§¨©ª«¬®¯°±²³´'; |
||
2794 | $this->assertEquals($expected, $result); |
||
2795 | |||
2796 | $string = 'ÉÊËÌÍÎÏÐÑÒÓÔÕÖ×ØÙÚÛÜÝÞßàáâãäåæçèéêëìíîïðñòóôõö÷øùúûüýþÿĀāĂ㥹ĆćĈĉĊċČčĎďĐđĒēĔĕĖėĘęĚěĜĝĞğĠġĢģĤĥĦħĨĩĪīĬ'; |
||
2797 | $find = 'Þ'; |
||
2798 | $result = mb_strrchr($string, $find); |
||
2799 | $expected = 'Þßàáâãäåæçèéêëìíîïðñòóôõö÷øùúûüýþÿĀāĂ㥹ĆćĈĉĊċČčĎďĐđĒēĔĕĖėĘęĚěĜĝĞğĠġĢģĤĥĦħĨĩĪīĬ'; |
||
2800 | $this->assertEquals($expected, $result); |
||
2801 | |||
2802 | $string = 'ÉÊËÌÍÎÏÐÑÒÓÔÕÖ×ØÙÚÛÜÝÞßàáâãäåæçèéêëìíîïðñòóôõö÷øùúûüýþÿĀāĂ㥹ĆćĈĉĊċČčĎďĐđĒēĔĕĖėĘęĚěĜĝĞğĠġĢģĤĥĦħĨĩĪīĬ'; |
||
2803 | $find = 'Þ'; |
||
2804 | $result = mb_strrchr($string, $find, true); |
||
2805 | $expected = 'ÉÊËÌÍÎÏÐÑÒÓÔÕÖ×ØÙÚÛÜÝ'; |
||
2806 | $this->assertEquals($expected, $result); |
||
2807 | |||
2808 | $string = 'ĭĮįİıIJijĴĵĶķĸĹĺĻļĽľĿŀŁłŃńŅņŇňʼnŊŋŌōŎŏŐőŒœŔŕŖŗŘřŚśŜŝŞşŠšŢţŤťŦŧŨũŪūŬŭŮůŰűŲųŴŵŶŷŸŹźŻżŽžſƀƁƂƃƄƅƆƇƈƉƊƋƌƍƎƏƐ'; |
||
2809 | $find = 'Ņ'; |
||
2810 | $result = mb_strrchr($string, $find); |
||
2811 | $expected = 'ŅņŇňʼnŊŋŌōŎŏŐőŒœŔŕŖŗŘřŚśŜŝŞşŠšŢţŤťŦŧŨũŪūŬŭŮůŰűŲųŴŵŶŷŸŹźŻżŽžſƀƁƂƃƄƅƆƇƈƉƊƋƌƍƎƏƐ'; |
||
2812 | $this->assertEquals($expected, $result); |
||
2813 | |||
2814 | $string = 'ĭĮįİıIJijĴĵĶķĸĹĺĻļĽľĿŀŁłŃńŅņŇňʼnŊŋŌōŎŏŐőŒœŔŕŖŗŘřŚśŜŝŞşŠšŢţŤťŦŧŨũŪūŬŭŮůŰűŲųŴŵŶŷŸŹźŻżŽžſƀƁƂƃƄƅƆƇƈƉƊƋƌƍƎƏƐ'; |
||
2815 | $find = 'Ņ'; |
||
2816 | $result = mb_strrchr($string, $find, true); |
||
2817 | $expected = 'ĭĮįİıIJijĴĵĶķĸĹĺĻļĽľĿŀŁłŃń'; |
||
2818 | $this->assertEquals($expected, $result); |
||
2819 | |||
2820 | $string = 'ƑƒƓƔƕƖƗƘƙƚƛƜƝƞƟƠơƢƣƤƥƦƧƨƩƪƫƬƭƮƯưƱƲƳƴƵƶƷƸƹƺƻƼƽƾƿǀǁǂǃDŽDždžLJLjljNJNjnjǍǎǏǐǑǒǓǔǕǖǗǘǙǚǛǜǝǞǟǠǡǢǣǤǥǦǧǨǩǪǫǬǭǮǯǰDZDzdzǴ'; |
||
2821 | $find = 'Ƹ'; |
||
2822 | $result = mb_strrchr($string, $find); |
||
2823 | $expected = 'ƸƹƺƻƼƽƾƿǀǁǂǃDŽDždžLJLjljNJNjnjǍǎǏǐǑǒǓǔǕǖǗǘǙǚǛǜǝǞǟǠǡǢǣǤǥǦǧǨǩǪǫǬǭǮǯǰDZDzdzǴ'; |
||
2824 | $this->assertEquals($expected, $result); |
||
2825 | |||
2826 | $find = 'Ƹ'; |
||
2827 | $result = mb_strrchr($string, $find, true); |
||
2828 | $expected = 'ƑƒƓƔƕƖƗƘƙƚƛƜƝƞƟƠơƢƣƤƥƦƧƨƩƪƫƬƭƮƯưƱƲƳƴƵƶƷ'; |
||
2829 | $this->assertEquals($expected, $result); |
||
2830 | |||
2831 | $string = 'əɚɛɜɝɞɟɠɡɢɣɤɥɦɧɨɩɪɫɬɭɮɯɰɱɲɳɴɵɶɷɸɹɺɻɼɽɾɿʀʁʂʃʄʅʆʇʈʉʊʋʌʍʎʏʐʑʒʓʔʕʖʗʘʙʚʛʜʝʞʟʠʡʢʣʤʥʦʧʨʩʪʫʬʭʮʯʰʱʲʳʴʵʶʷʸʹʺʻʼ'; |
||
2832 | $find = 'ʀ'; |
||
2833 | $result = mb_strrchr($string, $find); |
||
2834 | $expected = 'ʀʁʂʃʄʅʆʇʈʉʊʋʌʍʎʏʐʑʒʓʔʕʖʗʘʙʚʛʜʝʞʟʠʡʢʣʤʥʦʧʨʩʪʫʬʭʮʯʰʱʲʳʴʵʶʷʸʹʺʻʼ'; |
||
2835 | $this->assertEquals($expected, $result); |
||
2836 | |||
2837 | $string = 'əɚɛɜɝɞɟɠɡɢɣɤɥɦɧɨɩɪɫɬɭɮɯɰɱɲɳɴɵɶɷɸɹɺɻɼɽɾɿʀʁʂʃʄʅʆʇʈʉʊʋʌʍʎʏʐʑʒʓʔʕʖʗʘʙʚʛʜʝʞʟʠʡʢʣʤʥʦʧʨʩʪʫʬʭʮʯʰʱʲʳʴʵʶʷʸʹʺʻʼ'; |
||
2838 | $find = 'ʀ'; |
||
2839 | $result = mb_strrchr($string, $find, true); |
||
2840 | $expected = 'əɚɛɜɝɞɟɠɡɢɣɤɥɦɧɨɩɪɫɬɭɮɯɰɱɲɳɴɵɶɷɸɹɺɻɼɽɾɿ'; |
||
2841 | $this->assertEquals($expected, $result); |
||
2842 | |||
2843 | $string = 'ЀЁЂЃЄЅІЇЈЉЊЋЌЍЎЏАБВГДЕЖЗИЙКЛ'; |
||
2844 | $find = 'Ї'; |
||
2845 | $result = mb_strrchr($string, $find); |
||
2846 | $expected = 'ЇЈЉЊЋЌЍЎЏАБВГДЕЖЗИЙКЛ'; |
||
2847 | $this->assertEquals($expected, $result); |
||
2848 | |||
2849 | $string = 'ЀЁЂЃЄЅІЇЈЉЊЋЌЍЎЏАБВГДЕЖЗИЙКЛ'; |
||
2850 | $find = 'Ї'; |
||
2851 | $result = mb_strrchr($string, $find, true); |
||
2852 | $expected = 'ЀЁЂЃЄЅІ'; |
||
2853 | $this->assertEquals($expected, $result); |
||
2854 | |||
2855 | $string = 'МНОПРСТУФХЦЧШЩЪЫЬЭЮЯабвгдежзийклмнопрстуфхцчшщъыь'; |
||
2856 | $find = 'Р'; |
||
2857 | $result = mb_strrchr($string, $find); |
||
2858 | $expected = 'РСТУФХЦЧШЩЪЫЬЭЮЯабвгдежзийклмнопрстуфхцчшщъыь'; |
||
2859 | $this->assertEquals($expected, $result); |
||
2860 | |||
2861 | $string = 'МНОПРСТУФХЦЧШЩЪЫЬЭЮЯабвгдежзийклмнопрстуфхцчшщъыь'; |
||
2862 | $find = 'Р'; |
||
2863 | $result = mb_strrchr($string, $find, true); |
||
2864 | $expected = 'МНОП'; |
||
2865 | $this->assertEquals($expected, $result); |
||
2866 | |||
2867 | $string = 'فقكلمنهوىيًٌٍَُ'; |
||
2868 | $find = 'ن'; |
||
2869 | $result = mb_strrchr($string, $find); |
||
2870 | $expected = 'نهوىيًٌٍَُ'; |
||
2871 | $this->assertEquals($expected, $result); |
||
2872 | |||
2873 | $string = 'فقكلمنهوىيًٌٍَُ'; |
||
2874 | $find = 'ن'; |
||
2875 | $result = mb_strrchr($string, $find, true); |
||
2876 | $expected = 'فقكلم'; |
||
2877 | $this->assertEquals($expected, $result); |
||
2878 | |||
2879 | $string = '✰✱✲✳✴✵✶✷✸✹✺✻✼✽✾✿❀❁❂❃❄❅❆❇❈❉❊❋❌❍❎❏❐❑❒❓❔❕❖❗❘❙❚❛❜❝❞'; |
||
2880 | $find = '✿'; |
||
2881 | $result = mb_strrchr($string, $find); |
||
2882 | $expected = '✿❀❁❂❃❄❅❆❇❈❉❊❋❌❍❎❏❐❑❒❓❔❕❖❗❘❙❚❛❜❝❞'; |
||
2883 | $this->assertEquals($expected, $result); |
||
2884 | |||
2885 | $string = '✰✱✲✳✴✵✶✷✸✹✺✻✼✽✾✿❀❁❂❃❄❅❆❇❈❉❊❋❌❍❎❏❐❑❒❓❔❕❖❗❘❙❚❛❜❝❞'; |
||
2886 | $find = '✿'; |
||
2887 | $result = mb_strrchr($string, $find, true); |
||
2888 | $expected = '✰✱✲✳✴✵✶✷✸✹✺✻✼✽✾'; |
||
2889 | $this->assertEquals($expected, $result); |
||
2890 | |||
2891 | $string = '⺀⺁⺂⺃⺄⺅⺆⺇⺈⺉⺊⺋⺌⺍⺎⺏⺐⺑⺒⺓⺔⺕⺖⺗⺘⺙⺛⺜⺝⺞⺟⺠⺡⺢⺣⺤⺥⺦⺧⺨⺩⺪⺫⺬⺭⺮⺯⺰⺱⺲⺳⺴⺵⺶⺷⺸⺹⺺⺻⺼⺽⺾⺿⻀⻁⻂⻃⻄⻅⻆⻇⻈⻉⻊⻋⻌⻍⻎⻏⻐⻑⻒⻓⻔⻕⻖⻗⻘⻙⻚⻛⻜⻝⻞⻟⻠'; |
||
2892 | $find = '⺐'; |
||
2893 | $result = mb_strrchr($string, $find); |
||
2894 | $expected = '⺐⺑⺒⺓⺔⺕⺖⺗⺘⺙⺛⺜⺝⺞⺟⺠⺡⺢⺣⺤⺥⺦⺧⺨⺩⺪⺫⺬⺭⺮⺯⺰⺱⺲⺳⺴⺵⺶⺷⺸⺹⺺⺻⺼⺽⺾⺿⻀⻁⻂⻃⻄⻅⻆⻇⻈⻉⻊⻋⻌⻍⻎⻏⻐⻑⻒⻓⻔⻕⻖⻗⻘⻙⻚⻛⻜⻝⻞⻟⻠'; |
||
2895 | $this->assertEquals($expected, $result); |
||
2896 | |||
2897 | $string = '⺀⺁⺂⺃⺄⺅⺆⺇⺈⺉⺊⺋⺌⺍⺎⺏⺐⺑⺒⺓⺔⺕⺖⺗⺘⺙⺛⺜⺝⺞⺟⺠⺡⺢⺣⺤⺥⺦⺧⺨⺩⺪⺫⺬⺭⺮⺯⺰⺱⺲⺳⺴⺵⺶⺷⺸⺹⺺⺻⺼⺽⺾⺿⻀⻁⻂⻃⻄⻅⻆⻇⻈⻉⻊⻋⻌⻍⻎⻏⻐⻑⻒⻓⻔⻕⻖⻗⻘⻙⻚⻛⻜⻝⻞⻟⻠'; |
||
2898 | $find = '⺐'; |
||
2899 | $result = mb_strrchr($string, $find, true); |
||
2900 | $expected = '⺀⺁⺂⺃⺄⺅⺆⺇⺈⺉⺊⺋⺌⺍⺎⺏'; |
||
2901 | $this->assertEquals($expected, $result); |
||
2902 | |||
2903 | $string = '⽅⽆⽇⽈⽉⽊⽋⽌⽍⽎⽏⽐⽑⽒⽓⽔⽕⽖⽗⽘⽙⽚⽛⽜⽝⽞⽟⽠⽡⽢⽣⽤⽥⽦⽧⽨⽩⽪⽫⽬⽭⽮⽯⽰⽱⽲⽳⽴⽵⽶⽷⽸⽹⽺⽻⽼⽽⽾⽿'; |
||
2904 | $find = '⽤'; |
||
2905 | $result = mb_strrchr($string, $find); |
||
2906 | $expected = '⽤⽥⽦⽧⽨⽩⽪⽫⽬⽭⽮⽯⽰⽱⽲⽳⽴⽵⽶⽷⽸⽹⽺⽻⽼⽽⽾⽿'; |
||
2907 | $this->assertEquals($expected, $result); |
||
2908 | |||
2909 | $string = '⽅⽆⽇⽈⽉⽊⽋⽌⽍⽎⽏⽐⽑⽒⽓⽔⽕⽖⽗⽘⽙⽚⽛⽜⽝⽞⽟⽠⽡⽢⽣⽤⽥⽦⽧⽨⽩⽪⽫⽬⽭⽮⽯⽰⽱⽲⽳⽴⽵⽶⽷⽸⽹⽺⽻⽼⽽⽾⽿'; |
||
2910 | $find = '⽤'; |
||
2911 | $result = mb_strrchr($string, $find, true); |
||
2912 | $expected = '⽅⽆⽇⽈⽉⽊⽋⽌⽍⽎⽏⽐⽑⽒⽓⽔⽕⽖⽗⽘⽙⽚⽛⽜⽝⽞⽟⽠⽡⽢⽣'; |
||
2913 | $this->assertEquals($expected, $result); |
||
2914 | |||
2915 | $string = '눡눢눣눤눥눦눧눨눩눪눫눬눭눮눯눰눱눲눳눴눵눶눷눸눹눺눻눼눽눾눿뉀뉁뉂뉃뉄뉅뉆뉇뉈뉉뉊뉋뉌뉍뉎뉏뉐뉑뉒뉓뉔뉕뉖뉗뉘뉙뉚뉛뉜뉝뉞뉟뉠뉡뉢뉣뉤뉥뉦뉧뉨뉩뉪뉫뉬뉭뉮뉯뉰뉱뉲뉳뉴뉵뉶뉷뉸뉹뉺뉻뉼뉽뉾뉿늀늁늂늃늄'; |
||
2916 | $find = '눻'; |
||
2917 | $result = mb_strrchr($string, $find); |
||
2918 | $expected = '눻눼눽눾눿뉀뉁뉂뉃뉄뉅뉆뉇뉈뉉뉊뉋뉌뉍뉎뉏뉐뉑뉒뉓뉔뉕뉖뉗뉘뉙뉚뉛뉜뉝뉞뉟뉠뉡뉢뉣뉤뉥뉦뉧뉨뉩뉪뉫뉬뉭뉮뉯뉰뉱뉲뉳뉴뉵뉶뉷뉸뉹뉺뉻뉼뉽뉾뉿늀늁늂늃늄'; |
||
2919 | $this->assertEquals($expected, $result); |
||
2920 | |||
2921 | $string = '눡눢눣눤눥눦눧눨눩눪눫눬눭눮눯눰눱눲눳눴눵눶눷눸눹눺눻눼눽눾눿뉀뉁뉂뉃뉄뉅뉆뉇뉈뉉뉊뉋뉌뉍뉎뉏뉐뉑뉒뉓뉔뉕뉖뉗뉘뉙뉚뉛뉜뉝뉞뉟뉠뉡뉢뉣뉤뉥뉦뉧뉨뉩뉪뉫뉬뉭뉮뉯뉰뉱뉲뉳뉴뉵뉶뉷뉸뉹뉺뉻뉼뉽뉾뉿늀늁늂늃늄'; |
||
2922 | $find = '눻'; |
||
2923 | $result = mb_strrchr($string, $find, true); |
||
2924 | $expected = '눡눢눣눤눥눦눧눨눩눪눫눬눭눮눯눰눱눲눳눴눵눶눷눸눹눺'; |
||
2925 | $this->assertEquals($expected, $result); |
||
2926 | |||
2927 | $string = 'ﹰﹱﹲﹳﹴﹶﹷﹸﹹﹺﹻﹼﹽﹾﹿﺀﺁﺂﺃﺄﺅﺆﺇﺈﺉﺊﺋﺌﺍﺎﺏﺐﺑﺒﺓﺔﺕﺖﺗﺘﺙﺚﺛﺜﺝﺞﺟﺠﺡﺢﺣﺤﺥﺦﺧﺨﺩﺪﺫﺬﺭﺮﺯﺰ'; |
||
2928 | $find = 'ﺞ'; |
||
2929 | $result = mb_strrchr($string, $find); |
||
2930 | $expected = 'ﺞﺟﺠﺡﺢﺣﺤﺥﺦﺧﺨﺩﺪﺫﺬﺭﺮﺯﺰ'; |
||
2931 | $this->assertEquals($expected, $result); |
||
2932 | |||
2933 | $string = 'ﹰﹱﹲﹳﹴﹶﹷﹸﹹﹺﹻﹼﹽﹾﹿﺀﺁﺂﺃﺄﺅﺆﺇﺈﺉﺊﺋﺌﺍﺎﺏﺐﺑﺒﺓﺔﺕﺖﺗﺘﺙﺚﺛﺜﺝﺞﺟﺠﺡﺢﺣﺤﺥﺦﺧﺨﺩﺪﺫﺬﺭﺮﺯﺰ'; |
||
2934 | $find = 'ﺞ'; |
||
2935 | $result = mb_strrchr($string, $find, true); |
||
2936 | $expected = 'ﹰﹱﹲﹳﹴﹶﹷﹸﹹﹺﹻﹼﹽﹾﹿﺀﺁﺂﺃﺄﺅﺆﺇﺈﺉﺊﺋﺌﺍﺎﺏﺐﺑﺒﺓﺔﺕﺖﺗﺘﺙﺚﺛﺜﺝ'; |
||
2937 | $this->assertEquals($expected, $result); |
||
2938 | |||
2939 | $string = 'ﺱﺲﺳﺴﺵﺶﺷﺸﺹﺺﺻﺼﺽﺾﺿﻀﻁﻂﻃﻄﻅﻆﻇﻈﻉﻊﻋﻌﻍﻎﻏﻐﻑﻒﻓﻔﻕﻖﻗﻘﻙﻚﻛﻜﻝﻞﻟﻠﻡﻢﻣﻤﻥﻦﻧﻨﻩﻪﻫﻬﻭﻮﻯﻰﻱﻲﻳﻴﻵﻶﻷﻸﻹﻺﻻﻼ'; |
||
2940 | $find = 'ﻞ'; |
||
2941 | $result = mb_strrchr($string, $find); |
||
2942 | $expected = 'ﻞﻟﻠﻡﻢﻣﻤﻥﻦﻧﻨﻩﻪﻫﻬﻭﻮﻯﻰﻱﻲﻳﻴﻵﻶﻷﻸﻹﻺﻻﻼ'; |
||
2943 | $this->assertEquals($expected, $result); |
||
2944 | |||
2945 | $string = 'ﺱﺲﺳﺴﺵﺶﺷﺸﺹﺺﺻﺼﺽﺾﺿﻀﻁﻂﻃﻄﻅﻆﻇﻈﻉﻊﻋﻌﻍﻎﻏﻐﻑﻒﻓﻔﻕﻖﻗﻘﻙﻚﻛﻜﻝﻞﻟﻠﻡﻢﻣﻤﻥﻦﻧﻨﻩﻪﻫﻬﻭﻮﻯﻰﻱﻲﻳﻴﻵﻶﻷﻸﻹﻺﻻﻼ'; |
||
2946 | $find = 'ﻞ'; |
||
2947 | $result = mb_strrchr($string, $find, true); |
||
2948 | $expected = 'ﺱﺲﺳﺴﺵﺶﺷﺸﺹﺺﺻﺼﺽﺾﺿﻀﻁﻂﻃﻄﻅﻆﻇﻈﻉﻊﻋﻌﻍﻎﻏﻐﻑﻒﻓﻔﻕﻖﻗﻘﻙﻚﻛﻜﻝ'; |
||
2949 | $this->assertEquals($expected, $result); |
||
2950 | |||
2951 | $string = 'abcdefghijklmnopqrstuvwxyz'; |
||
2952 | $find = 'k'; |
||
2953 | $result = mb_strrchr($string, $find); |
||
2954 | $expected = 'klmnopqrstuvwxyz'; |
||
2955 | $this->assertEquals($expected, $result); |
||
2956 | |||
2957 | $string = 'abcdefghijklmnopqrstuvwxyz'; |
||
2958 | $find = 'k'; |
||
2959 | $result = mb_strrchr($string, $find, true); |
||
2960 | $expected = 'abcdefghij'; |
||
2961 | $this->assertEquals($expected, $result); |
||
2962 | |||
2963 | $string = '。「」、・ヲァィゥェォャュョッーアイウエオカキク'; |
||
2964 | $find = 'ア'; |
||
2965 | $result = mb_strrchr($string, $find); |
||
2966 | $expected = 'アイウエオカキク'; |
||
2967 | $this->assertEquals($expected, $result); |
||
2968 | |||
2969 | $string = '。「」、・ヲァィゥェォャュョッーアイウエオカキク'; |
||
2970 | $find = 'ア'; |
||
2971 | $result = mb_strrchr($string, $find, true); |
||
2972 | $expected = '。「」、・ヲァィゥェォャュョッー'; |
||
2973 | $this->assertEquals($expected, $result); |
||
2974 | |||
2975 | $string = 'ケコサシスセソタチツテトナニヌネノハヒフヘホマミムメモヤユヨラリルレロワン゙'; |
||
2976 | $find = 'ハ'; |
||
2977 | $result = mb_strrchr($string, $find); |
||
2978 | $expected = 'ハヒフヘホマミムメモヤユヨラリルレロワン゙'; |
||
2979 | $this->assertEquals($expected, $result); |
||
2980 | |||
2981 | $string = 'ケコサシスセソタチツテトナニヌネノハヒフヘホマミムメモヤユヨラリルレロワン゙'; |
||
2982 | $find = 'ハ'; |
||
2983 | $result = mb_strrchr($string, $find, true); |
||
2984 | $expected = 'ケコサシスセソタチツテトナニヌネノ'; |
||
2985 | $this->assertEquals($expected, $result); |
||
2986 | |||
2987 | $string = 'Ĥēĺļŏ, Ŵőřļď!'; |
||
2988 | $find = 'ő'; |
||
2989 | $result = mb_strrchr($string, $find); |
||
2990 | $expected = 'őřļď!'; |
||
2991 | $this->assertEquals($expected, $result); |
||
2992 | |||
2993 | $string = 'Ĥēĺļŏ, Ŵőřļď!'; |
||
2994 | $find = 'ő'; |
||
2995 | $result = mb_strrchr($string, $find, true); |
||
2996 | $expected = 'Ĥēĺļŏ, Ŵ'; |
||
2997 | $this->assertEquals($expected, $result); |
||
2998 | |||
2999 | $string = 'Hello, World!'; |
||
3000 | $find = 'o'; |
||
3001 | $result = mb_strrchr($string, $find); |
||
3002 | $expected = 'orld!'; |
||
3003 | $this->assertEquals($expected, $result); |
||
3004 | |||
3005 | $string = 'Hello, World!'; |
||
3006 | $find = 'o'; |
||
3007 | $result = mb_strrchr($string, $find, true); |
||
3008 | $expected = 'Hello, W'; |
||
3009 | $this->assertEquals($expected, $result); |
||
3010 | |||
3011 | $string = 'Hello, World!'; |
||
3012 | $find = 'Wo'; |
||
3013 | $result = mb_strrchr($string, $find); |
||
3014 | $expected = 'World!'; |
||
3015 | $this->assertEquals($expected, $result); |
||
3016 | |||
3017 | $string = 'Hello, World!'; |
||
3018 | $find = 'Wo'; |
||
3019 | $result = mb_strrchr($string, $find, true); |
||
3020 | $expected = 'Hello, '; |
||
3021 | $this->assertEquals($expected, $result); |
||
3022 | |||
3023 | $string = 'Hello, World!'; |
||
3024 | $find = 'll'; |
||
3025 | $result = mb_strrchr($string, $find); |
||
3026 | $expected = 'llo, World!'; |
||
3027 | $this->assertEquals($expected, $result); |
||
3028 | |||
3029 | $string = 'Hello, World!'; |
||
3030 | $find = 'll'; |
||
3031 | $result = mb_strrchr($string, $find, true); |
||
3032 | $expected = 'He'; |
||
3033 | $this->assertEquals($expected, $result); |
||
3034 | |||
3035 | $string = 'Hello, World!'; |
||
3036 | $find = 'rld'; |
||
3037 | $result = mb_strrchr($string, $find); |
||
3038 | $expected = 'rld!'; |
||
3039 | $this->assertEquals($expected, $result); |
||
3040 | |||
3041 | $string = 'Hello, World!'; |
||
3042 | $find = 'rld'; |
||
3043 | $result = mb_strrchr($string, $find, true); |
||
3044 | $expected = 'Hello, Wo'; |
||
3045 | $this->assertEquals($expected, $result); |
||
3046 | |||
3047 | $string = 'čini'; |
||
3048 | $find = 'n'; |
||
3049 | $result = mb_strrchr($string, $find); |
||
3050 | $expected = 'ni'; |
||
3051 | $this->assertEquals($expected, $result); |
||
3052 | |||
3053 | $string = 'čini'; |
||
3054 | $find = 'n'; |
||
3055 | $result = mb_strrchr($string, $find, true); |
||
3056 | $expected = 'či'; |
||
3057 | $this->assertEquals($expected, $result); |
||
3058 | |||
3059 | $string = 'moći'; |
||
3060 | $find = 'ć'; |
||
3061 | $result = mb_strrchr($string, $find); |
||
3062 | $expected = 'ći'; |
||
3063 | $this->assertEquals($expected, $result); |
||
3064 | |||
3065 | $string = 'moći'; |
||
3066 | $find = 'ć'; |
||
3067 | $result = mb_strrchr($string, $find, true); |
||
3068 | $expected = 'mo'; |
||
3069 | $this->assertEquals($expected, $result); |
||
3070 | |||
3071 | $string = 'državni'; |
||
3072 | $find = 'ž'; |
||
3073 | $result = mb_strrchr($string, $find); |
||
3074 | $expected = 'žavni'; |
||
3075 | $this->assertEquals($expected, $result); |
||
3076 | |||
3077 | $string = 'državni'; |
||
3078 | $find = 'ž'; |
||
3079 | $result = mb_strrchr($string, $find, true); |
||
3080 | $expected = 'dr'; |
||
3081 | $this->assertEquals($expected, $result); |
||
3082 | |||
3083 | $string = '把百度设为首页'; |
||
3084 | $find = '设'; |
||
3085 | $result = mb_strrchr($string, $find); |
||
3086 | $expected = '设为首页'; |
||
3087 | $this->assertEquals($expected, $result); |
||
3088 | |||
3089 | $string = '把百度设为首页'; |
||
3090 | $find = '设'; |
||
3091 | $result = mb_strrchr($string, $find, true); |
||
3092 | $expected = '把百度'; |
||
3093 | $this->assertEquals($expected, $result); |
||
3094 | |||
3095 | $string = '一二三周永龍'; |
||
3096 | $find = '周'; |
||
3097 | $result = mb_strrchr($string, $find); |
||
3098 | $expected = '周永龍'; |
||
3099 | $this->assertEquals($expected, $result); |
||
3100 | |||
3101 | $string = '一二三周永龍'; |
||
3102 | $find = '周'; |
||
3103 | $result = mb_strrchr($string, $find, true); |
||
3104 | $expected = '一二三'; |
||
3105 | $this->assertEquals($expected, $result); |
||
3106 | |||
3107 | $string = '一二三周永龍'; |
||
3108 | $find = '周龍'; |
||
3109 | $result = mb_strrchr($string, $find, true); |
||
3110 | $expected = false; |
||
3111 | $this->assertEquals($expected, $result); |
||
3112 | } |
||
3113 | |||
3114 | /**
|
||
3115 | * testMultibyteStrrchr method
|
||
3116 | *
|
||
3117 | * @return void
|
||
3118 | */
|
||
3119 | public function testMultibyteStrrchr() { |
||
3120 | $string = 'ABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789'; |
||
3121 | $find = 'F'; |
||
3122 | $result = Multibyte::strrchr($string, $find); |
||
3123 | $expected = 'FGHIJKLMNOPQRSTUVWXYZ0123456789'; |
||
3124 | $this->assertEquals($expected, $result); |
||
3125 | |||
3126 | $string = 'ABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789'; |
||
3127 | $find = 'F'; |
||
3128 | $result = Multibyte::strrchr($string, $find, true); |
||
3129 | $expected = 'ABCDE'; |
||
3130 | $this->assertEquals($expected, $result); |
||
3131 | |||
3132 | $string = 'ÀÁÂÃÄÅÆÇÈÉÊËÌÍÎÏÐÑÒÓÔÕÖØÙÚÛÜÝÞ'; |
||
3133 | $find = 'Å'; |
||
3134 | $result = Multibyte::strrchr($string, $find); |
||
3135 | $expected = 'ÅÆÇÈÉÊËÌÍÎÏÐÑÒÓÔÕÖØÙÚÛÜÝÞ'; |
||
3136 | $this->assertEquals($expected, $result); |
||
3137 | |||
3138 | $string = 'ÀÁÂÃÄÅÆÇÈÉÊËÌÍÎÏÐÑÒÓÔÕÖØÙÚÛÜÝÞ'; |
||
3139 | $find = 'Å'; |
||
3140 | $result = Multibyte::strrchr($string, $find, true); |
||
3141 | $expected = 'ÀÁÂÃÄ'; |
||
3142 | $this->assertEquals($expected, $result); |
||
3143 | |||
3144 | $string = 'ĀĂĄĆĈĊČĎĐĒĔĖĘĚĜĞĠĢĤĦĨĪĬĮIJĴĶĹĻĽĿŁŃŅŇŊŌŎŐŒŔŖŘŚŜŞŠŢŤŦŨŪŬŮŰŲŴŶŹŻŽ'; |
||
3145 | $find = 'Ċ'; |
||
3146 | $result = Multibyte::strrchr($string, $find); |
||
3147 | $expected = 'ĊČĎĐĒĔĖĘĚĜĞĠĢĤĦĨĪĬĮIJĴĶĹĻĽĿŁŃŅŇŊŌŎŐŒŔŖŘŚŜŞŠŢŤŦŨŪŬŮŰŲŴŶŹŻŽ'; |
||
3148 | $this->assertEquals($expected, $result); |
||
3149 | |||
3150 | $string = 'ĀĂĄĆĈĊČĎĐĒĔĖĘĚĜĞĠĢĤĦĨĪĬĮIJĴĶĹĻĽĿŁŃŅŇŊŌŎŐŒŔŖŘŚŜŞŠŢŤŦŨŪŬŮŰŲŴŶŹŻŽ'; |
||
3151 | $find = 'Ċ'; |
||
3152 | $result = Multibyte::strrchr($string, $find, true); |
||
3153 | $expected = 'ĀĂĄĆĈ'; |
||
3154 | $this->assertEquals($expected, $result); |
||
3155 | |||
3156 | $string = '!"#$%&\'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~'; |
||
3157 | $find = 'F'; |
||
3158 | $result = Multibyte::strrchr($string, $find); |
||
3159 | $expected = 'FGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~'; |
||
3160 | $this->assertEquals($expected, $result); |
||
3161 | |||
3162 | $string = '!"#$%&\'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~'; |
||
3163 | $find = 'F'; |
||
3164 | $result = Multibyte::strrchr($string, $find, true); |
||
3165 | $expected = '!"#$%&\'()*+,-./0123456789:;<=>?@ABCDE'; |
||
3166 | $this->assertEquals($expected, $result); |
||
3167 | |||
3168 | $string = '¡¢£¤¥¦§¨©ª«¬®¯°±²³´µ¶·¸¹º»¼½¾¿ÀÁÂÃÄÅÆÇÈ'; |
||
3169 | $find = 'µ'; |
||
3170 | $result = Multibyte::strrchr($string, $find); |
||
3171 | $expected = 'µ¶·¸¹º»¼½¾¿ÀÁÂÃÄÅÆÇÈ'; |
||
3172 | $this->assertEquals($expected, $result); |
||
3173 | |||
3174 | $string = '¡¢£¤¥¦§¨©ª«¬®¯°±²³´µ¶·¸¹º»¼½¾¿ÀÁÂÃÄÅÆÇÈ'; |
||
3175 | $find = 'µ'; |
||
3176 | $result = Multibyte::strrchr($string, $find, true); |
||
3177 | $expected = '¡¢£¤¥¦§¨©ª«¬®¯°±²³´'; |
||
3178 | $this->assertEquals($expected, $result); |
||
3179 | |||
3180 | $string = 'ÉÊËÌÍÎÏÐÑÒÓÔÕÖ×ØÙÚÛÜÝÞßàáâãäåæçèéêëìíîïðñòóôõö÷øùúûüýþÿĀāĂ㥹ĆćĈĉĊċČčĎďĐđĒēĔĕĖėĘęĚěĜĝĞğĠġĢģĤĥĦħĨĩĪīĬ'; |
||
3181 | $find = 'Þ'; |
||
3182 | $result = Multibyte::strrchr($string, $find); |
||
3183 | $expected = 'Þßàáâãäåæçèéêëìíîïðñòóôõö÷øùúûüýþÿĀāĂ㥹ĆćĈĉĊċČčĎďĐđĒēĔĕĖėĘęĚěĜĝĞğĠġĢģĤĥĦħĨĩĪīĬ'; |
||
3184 | $this->assertEquals($expected, $result); |
||
3185 | |||
3186 | $string = 'ÉÊËÌÍÎÏÐÑÒÓÔÕÖ×ØÙÚÛÜÝÞßàáâãäåæçèéêëìíîïðñòóôõö÷øùúûüýþÿĀāĂ㥹ĆćĈĉĊċČčĎďĐđĒēĔĕĖėĘęĚěĜĝĞğĠġĢģĤĥĦħĨĩĪīĬ'; |
||
3187 | $find = 'Þ'; |
||
3188 | $result = Multibyte::strrchr($string, $find, true); |
||
3189 | $expected = 'ÉÊËÌÍÎÏÐÑÒÓÔÕÖ×ØÙÚÛÜÝ'; |
||
3190 | $this->assertEquals($expected, $result); |
||
3191 | |||
3192 | $string = 'ĭĮįİıIJijĴĵĶķĸĹĺĻļĽľĿŀŁłŃńŅņŇňʼnŊŋŌōŎŏŐőŒœŔŕŖŗŘřŚśŜŝŞşŠšŢţŤťŦŧŨũŪūŬŭŮůŰűŲųŴŵŶŷŸŹźŻżŽžſƀƁƂƃƄƅƆƇƈƉƊƋƌƍƎƏƐ'; |
||
3193 | $find = 'Ņ'; |
||
3194 | $result = Multibyte::strrchr($string, $find); |
||
3195 | $expected = 'ŅņŇňʼnŊŋŌōŎŏŐőŒœŔŕŖŗŘřŚśŜŝŞşŠšŢţŤťŦŧŨũŪūŬŭŮůŰűŲųŴŵŶŷŸŹźŻżŽžſƀƁƂƃƄƅƆƇƈƉƊƋƌƍƎƏƐ'; |
||
3196 | $this->assertEquals($expected, $result); |
||
3197 | |||
3198 | $string = 'ĭĮįİıIJijĴĵĶķĸĹĺĻļĽľĿŀŁłŃńŅņŇňʼnŊŋŌōŎŏŐőŒœŔŕŖŗŘřŚśŜŝŞşŠšŢţŤťŦŧŨũŪūŬŭŮůŰűŲųŴŵŶŷŸŹźŻżŽžſƀƁƂƃƄƅƆƇƈƉƊƋƌƍƎƏƐ'; |
||
3199 | $find = 'Ņ'; |
||
3200 | $result = Multibyte::strrchr($string, $find, true); |
||
3201 | $expected = 'ĭĮįİıIJijĴĵĶķĸĹĺĻļĽľĿŀŁłŃń'; |
||
3202 | $this->assertEquals($expected, $result); |
||
3203 | |||
3204 | $string = 'ƑƒƓƔƕƖƗƘƙƚƛƜƝƞƟƠơƢƣƤƥƦƧƨƩƪƫƬƭƮƯưƱƲƳƴƵƶƷƸƹƺƻƼƽƾƿǀǁǂǃDŽDždžLJLjljNJNjnjǍǎǏǐǑǒǓǔǕǖǗǘǙǚǛǜǝǞǟǠǡǢǣǤǥǦǧǨǩǪǫǬǭǮǯǰDZDzdzǴ'; |
||
3205 | $find = 'Ƹ'; |
||
3206 | $result = Multibyte::strrchr($string, $find); |
||
3207 | $expected = 'ƸƹƺƻƼƽƾƿǀǁǂǃDŽDždžLJLjljNJNjnjǍǎǏǐǑǒǓǔǕǖǗǘǙǚǛǜǝǞǟǠǡǢǣǤǥǦǧǨǩǪǫǬǭǮǯǰDZDzdzǴ'; |
||
3208 | $this->assertEquals($expected, $result); |
||
3209 | |||
3210 | $find = 'Ƹ'; |
||
3211 | $result = Multibyte::strrchr($string, $find, true); |
||
3212 | $expected = 'ƑƒƓƔƕƖƗƘƙƚƛƜƝƞƟƠơƢƣƤƥƦƧƨƩƪƫƬƭƮƯưƱƲƳƴƵƶƷ'; |
||
3213 | $this->assertEquals($expected, $result); |
||
3214 | |||
3215 | $string = 'əɚɛɜɝɞɟɠɡɢɣɤɥɦɧɨɩɪɫɬɭɮɯɰɱɲɳɴɵɶɷɸɹɺɻɼɽɾɿʀʁʂʃʄʅʆʇʈʉʊʋʌʍʎʏʐʑʒʓʔʕʖʗʘʙʚʛʜʝʞʟʠʡʢʣʤʥʦʧʨʩʪʫʬʭʮʯʰʱʲʳʴʵʶʷʸʹʺʻʼ'; |
||
3216 | $find = 'ʀ'; |
||
3217 | $result = Multibyte::strrchr($string, $find); |
||
3218 | $expected = 'ʀʁʂʃʄʅʆʇʈʉʊʋʌʍʎʏʐʑʒʓʔʕʖʗʘʙʚʛʜʝʞʟʠʡʢʣʤʥʦʧʨʩʪʫʬʭʮʯʰʱʲʳʴʵʶʷʸʹʺʻʼ'; |
||
3219 | $this->assertEquals($expected, $result); |
||
3220 | |||
3221 | $string = 'əɚɛɜɝɞɟɠɡɢɣɤɥɦɧɨɩɪɫɬɭɮɯɰɱɲɳɴɵɶɷɸɹɺɻɼɽɾɿʀʁʂʃʄʅʆʇʈʉʊʋʌʍʎʏʐʑʒʓʔʕʖʗʘʙʚʛʜʝʞʟʠʡʢʣʤʥʦʧʨʩʪʫʬʭʮʯʰʱʲʳʴʵʶʷʸʹʺʻʼ'; |
||
3222 | $find = 'ʀ'; |
||
3223 | $result = Multibyte::strrchr($string, $find, true); |
||
3224 | $expected = 'əɚɛɜɝɞɟɠɡɢɣɤɥɦɧɨɩɪɫɬɭɮɯɰɱɲɳɴɵɶɷɸɹɺɻɼɽɾɿ'; |
||
3225 | $this->assertEquals($expected, $result); |
||
3226 | |||
3227 | $string = 'ЀЁЂЃЄЅІЇЈЉЊЋЌЍЎЏАБВГДЕЖЗИЙКЛ'; |
||
3228 | $find = 'Ї'; |
||
3229 | $result = Multibyte::strrchr($string, $find); |
||
3230 | $expected = 'ЇЈЉЊЋЌЍЎЏАБВГДЕЖЗИЙКЛ'; |
||
3231 | $this->assertEquals($expected, $result); |
||
3232 | |||
3233 | $string = 'ЀЁЂЃЄЅІЇЈЉЊЋЌЍЎЏАБВГДЕЖЗИЙКЛ'; |
||
3234 | $find = 'Ї'; |
||
3235 | $result = Multibyte::strrchr($string, $find, true); |
||
3236 | $expected = 'ЀЁЂЃЄЅІ'; |
||
3237 | $this->assertEquals($expected, $result); |
||
3238 | |||
3239 | $string = 'МНОПРСТУФХЦЧШЩЪЫЬЭЮЯабвгдежзийклмнопрстуфхцчшщъыь'; |
||
3240 | $find = 'Р'; |
||
3241 | $result = Multibyte::strrchr($string, $find); |
||
3242 | $expected = 'РСТУФХЦЧШЩЪЫЬЭЮЯабвгдежзийклмнопрстуфхцчшщъыь'; |
||
3243 | $this->assertEquals($expected, $result); |
||
3244 | |||
3245 | $string = 'МНОПРСТУФХЦЧШЩЪЫЬЭЮЯабвгдежзийклмнопрстуфхцчшщъыь'; |
||
3246 | $find = 'Р'; |
||
3247 | $result = Multibyte::strrchr($string, $find, true); |
||
3248 | $expected = 'МНОП'; |
||
3249 | $this->assertEquals($expected, $result); |
||
3250 | |||
3251 | $string = 'فقكلمنهوىيًٌٍَُ'; |
||
3252 | $find = 'ن'; |
||
3253 | $result = Multibyte::strrchr($string, $find); |
||
3254 | $expected = 'نهوىيًٌٍَُ'; |
||
3255 | $this->assertEquals($expected, $result); |
||
3256 | |||
3257 | $string = 'فقكلمنهوىيًٌٍَُ'; |
||
3258 | $find = 'ن'; |
||
3259 | $result = Multibyte::strrchr($string, $find, true); |
||
3260 | $expected = 'فقكلم'; |
||
3261 | $this->assertEquals($expected, $result); |
||
3262 | |||
3263 | $string = '✰✱✲✳✴✵✶✷✸✹✺✻✼✽✾✿❀❁❂❃❄❅❆❇❈❉❊❋❌❍❎❏❐❑❒❓❔❕❖❗❘❙❚❛❜❝❞'; |
||
3264 | $find = '✿'; |
||
3265 | $result = Multibyte::strrchr($string, $find); |
||
3266 | $expected = '✿❀❁❂❃❄❅❆❇❈❉❊❋❌❍❎❏❐❑❒❓❔❕❖❗❘❙❚❛❜❝❞'; |
||
3267 | $this->assertEquals($expected, $result); |
||
3268 | |||
3269 | $string = '✰✱✲✳✴✵✶✷✸✹✺✻✼✽✾✿❀❁❂❃❄❅❆❇❈❉❊❋❌❍❎❏❐❑❒❓❔❕❖❗❘❙❚❛❜❝❞'; |
||
3270 | $find = '✿'; |
||
3271 | $result = Multibyte::strrchr($string, $find, true); |
||
3272 | $expected = '✰✱✲✳✴✵✶✷✸✹✺✻✼✽✾'; |
||
3273 | $this->assertEquals($expected, $result); |
||
3274 | |||
3275 | $string = '⺀⺁⺂⺃⺄⺅⺆⺇⺈⺉⺊⺋⺌⺍⺎⺏⺐⺑⺒⺓⺔⺕⺖⺗⺘⺙⺛⺜⺝⺞⺟⺠⺡⺢⺣⺤⺥⺦⺧⺨⺩⺪⺫⺬⺭⺮⺯⺰⺱⺲⺳⺴⺵⺶⺷⺸⺹⺺⺻⺼⺽⺾⺿⻀⻁⻂⻃⻄⻅⻆⻇⻈⻉⻊⻋⻌⻍⻎⻏⻐⻑⻒⻓⻔⻕⻖⻗⻘⻙⻚⻛⻜⻝⻞⻟⻠'; |
||
3276 | $find = '⺐'; |
||
3277 | $result = Multibyte::strrchr($string, $find); |
||
3278 | $expected = '⺐⺑⺒⺓⺔⺕⺖⺗⺘⺙⺛⺜⺝⺞⺟⺠⺡⺢⺣⺤⺥⺦⺧⺨⺩⺪⺫⺬⺭⺮⺯⺰⺱⺲⺳⺴⺵⺶⺷⺸⺹⺺⺻⺼⺽⺾⺿⻀⻁⻂⻃⻄⻅⻆⻇⻈⻉⻊⻋⻌⻍⻎⻏⻐⻑⻒⻓⻔⻕⻖⻗⻘⻙⻚⻛⻜⻝⻞⻟⻠'; |
||
3279 | $this->assertEquals($expected, $result); |
||
3280 | |||
3281 | $string = '⺀⺁⺂⺃⺄⺅⺆⺇⺈⺉⺊⺋⺌⺍⺎⺏⺐⺑⺒⺓⺔⺕⺖⺗⺘⺙⺛⺜⺝⺞⺟⺠⺡⺢⺣⺤⺥⺦⺧⺨⺩⺪⺫⺬⺭⺮⺯⺰⺱⺲⺳⺴⺵⺶⺷⺸⺹⺺⺻⺼⺽⺾⺿⻀⻁⻂⻃⻄⻅⻆⻇⻈⻉⻊⻋⻌⻍⻎⻏⻐⻑⻒⻓⻔⻕⻖⻗⻘⻙⻚⻛⻜⻝⻞⻟⻠'; |
||
3282 | $find = '⺐'; |
||
3283 | $result = Multibyte::strrchr($string, $find, true); |
||
3284 | $expected = '⺀⺁⺂⺃⺄⺅⺆⺇⺈⺉⺊⺋⺌⺍⺎⺏'; |
||
3285 | $this->assertEquals($expected, $result); |
||
3286 | |||
3287 | $string = '⽅⽆⽇⽈⽉⽊⽋⽌⽍⽎⽏⽐⽑⽒⽓⽔⽕⽖⽗⽘⽙⽚⽛⽜⽝⽞⽟⽠⽡⽢⽣⽤⽥⽦⽧⽨⽩⽪⽫⽬⽭⽮⽯⽰⽱⽲⽳⽴⽵⽶⽷⽸⽹⽺⽻⽼⽽⽾⽿'; |
||
3288 | $find = '⽤'; |
||
3289 | $result = Multibyte::strrchr($string, $find); |
||
3290 | $expected = '⽤⽥⽦⽧⽨⽩⽪⽫⽬⽭⽮⽯⽰⽱⽲⽳⽴⽵⽶⽷⽸⽹⽺⽻⽼⽽⽾⽿'; |
||
3291 | $this->assertEquals($expected, $result); |
||
3292 | |||
3293 | $string = '⽅⽆⽇⽈⽉⽊⽋⽌⽍⽎⽏⽐⽑⽒⽓⽔⽕⽖⽗⽘⽙⽚⽛⽜⽝⽞⽟⽠⽡⽢⽣⽤⽥⽦⽧⽨⽩⽪⽫⽬⽭⽮⽯⽰⽱⽲⽳⽴⽵⽶⽷⽸⽹⽺⽻⽼⽽⽾⽿'; |
||
3294 | $find = '⽤'; |
||
3295 | $result = Multibyte::strrchr($string, $find, true); |
||
3296 | $expected = '⽅⽆⽇⽈⽉⽊⽋⽌⽍⽎⽏⽐⽑⽒⽓⽔⽕⽖⽗⽘⽙⽚⽛⽜⽝⽞⽟⽠⽡⽢⽣'; |
||
3297 | $this->assertEquals($expected, $result); |
||
3298 | |||
3299 | $string = '눡눢눣눤눥눦눧눨눩눪눫눬눭눮눯눰눱눲눳눴눵눶눷눸눹눺눻눼눽눾눿뉀뉁뉂뉃뉄뉅뉆뉇뉈뉉뉊뉋뉌뉍뉎뉏뉐뉑뉒뉓뉔뉕뉖뉗뉘뉙뉚뉛뉜뉝뉞뉟뉠뉡뉢뉣뉤뉥뉦뉧뉨뉩뉪뉫뉬뉭뉮뉯뉰뉱뉲뉳뉴뉵뉶뉷뉸뉹뉺뉻뉼뉽뉾뉿늀늁늂늃늄'; |
||
3300 | $find = '눻'; |
||
3301 | $result = Multibyte::strrchr($string, $find); |
||
3302 | $expected = '눻눼눽눾눿뉀뉁뉂뉃뉄뉅뉆뉇뉈뉉뉊뉋뉌뉍뉎뉏뉐뉑뉒뉓뉔뉕뉖뉗뉘뉙뉚뉛뉜뉝뉞뉟뉠뉡뉢뉣뉤뉥뉦뉧뉨뉩뉪뉫뉬뉭뉮뉯뉰뉱뉲뉳뉴뉵뉶뉷뉸뉹뉺뉻뉼뉽뉾뉿늀늁늂늃늄'; |
||
3303 | $this->assertEquals($expected, $result); |
||
3304 | |||
3305 | $string = '눡눢눣눤눥눦눧눨눩눪눫눬눭눮눯눰눱눲눳눴눵눶눷눸눹눺눻눼눽눾눿뉀뉁뉂뉃뉄뉅뉆뉇뉈뉉뉊뉋뉌뉍뉎뉏뉐뉑뉒뉓뉔뉕뉖뉗뉘뉙뉚뉛뉜뉝뉞뉟뉠뉡뉢뉣뉤뉥뉦뉧뉨뉩뉪뉫뉬뉭뉮뉯뉰뉱뉲뉳뉴뉵뉶뉷뉸뉹뉺뉻뉼뉽뉾뉿늀늁늂늃늄'; |
||
3306 | $find = '눻'; |
||
3307 | $result = Multibyte::strrchr($string, $find, true); |
||
3308 | $expected = '눡눢눣눤눥눦눧눨눩눪눫눬눭눮눯눰눱눲눳눴눵눶눷눸눹눺'; |
||
3309 | $this->assertEquals($expected, $result); |
||
3310 | |||
3311 | $string = 'ﹰﹱﹲﹳﹴﹶﹷﹸﹹﹺﹻﹼﹽﹾﹿﺀﺁﺂﺃﺄﺅﺆﺇﺈﺉﺊﺋﺌﺍﺎﺏﺐﺑﺒﺓﺔﺕﺖﺗﺘﺙﺚﺛﺜﺝﺞﺟﺠﺡﺢﺣﺤﺥﺦﺧﺨﺩﺪﺫﺬﺭﺮﺯﺰ'; |
||
3312 | $find = 'ﺞ'; |
||
3313 | $result = Multibyte::strrchr($string, $find); |
||
3314 | $expected = 'ﺞﺟﺠﺡﺢﺣﺤﺥﺦﺧﺨﺩﺪﺫﺬﺭﺮﺯﺰ'; |
||
3315 | $this->assertEquals($expected, $result); |
||
3316 | |||
3317 | $string = 'ﹰﹱﹲﹳﹴﹶﹷﹸﹹﹺﹻﹼﹽﹾﹿﺀﺁﺂﺃﺄﺅﺆﺇﺈﺉﺊﺋﺌﺍﺎﺏﺐﺑﺒﺓﺔﺕﺖﺗﺘﺙﺚﺛﺜﺝﺞﺟﺠﺡﺢﺣﺤﺥﺦﺧﺨﺩﺪﺫﺬﺭﺮﺯﺰ'; |
||
3318 | $find = 'ﺞ'; |
||
3319 | $result = Multibyte::strrchr($string, $find, true); |
||
3320 | $expected = 'ﹰﹱﹲﹳﹴﹶﹷﹸﹹﹺﹻﹼﹽﹾﹿﺀﺁﺂﺃﺄﺅﺆﺇﺈﺉﺊﺋﺌﺍﺎﺏﺐﺑﺒﺓﺔﺕﺖﺗﺘﺙﺚﺛﺜﺝ'; |
||
3321 | $this->assertEquals($expected, $result); |
||
3322 | |||
3323 | $string = 'ﺱﺲﺳﺴﺵﺶﺷﺸﺹﺺﺻﺼﺽﺾﺿﻀﻁﻂﻃﻄﻅﻆﻇﻈﻉﻊﻋﻌﻍﻎﻏﻐﻑﻒﻓﻔﻕﻖﻗﻘﻙﻚﻛﻜﻝﻞﻟﻠﻡﻢﻣﻤﻥﻦﻧﻨﻩﻪﻫﻬﻭﻮﻯﻰﻱﻲﻳﻴﻵﻶﻷﻸﻹﻺﻻﻼ'; |
||
3324 | $find = 'ﻞ'; |
||
3325 | $result = Multibyte::strrchr($string, $find); |
||
3326 | $expected = 'ﻞﻟﻠﻡﻢﻣﻤﻥﻦﻧﻨﻩﻪﻫﻬﻭﻮﻯﻰﻱﻲﻳﻴﻵﻶﻷﻸﻹﻺﻻﻼ'; |
||
3327 | $this->assertEquals($expected, $result); |
||
3328 | |||
3329 | $string = 'ﺱﺲﺳﺴﺵﺶﺷﺸﺹﺺﺻﺼﺽﺾﺿﻀﻁﻂﻃﻄﻅﻆﻇﻈﻉﻊﻋﻌﻍﻎﻏﻐﻑﻒﻓﻔﻕﻖﻗﻘﻙﻚﻛﻜﻝﻞﻟﻠﻡﻢﻣﻤﻥﻦﻧﻨﻩﻪﻫﻬﻭﻮﻯﻰﻱﻲﻳﻴﻵﻶﻷﻸﻹﻺﻻﻼ'; |
||
3330 | $find = 'ﻞ'; |
||
3331 | $result = Multibyte::strrchr($string, $find, true); |
||
3332 | $expected = 'ﺱﺲﺳﺴﺵﺶﺷﺸﺹﺺﺻﺼﺽﺾﺿﻀﻁﻂﻃﻄﻅﻆﻇﻈﻉﻊﻋﻌﻍﻎﻏﻐﻑﻒﻓﻔﻕﻖﻗﻘﻙﻚﻛﻜﻝ'; |
||
3333 | $this->assertEquals($expected, $result); |
||
3334 | |||
3335 | $string = 'abcdefghijklmnopqrstuvwxyz'; |
||
3336 | $find = 'k'; |
||
3337 | $result = Multibyte::strrchr($string, $find); |
||
3338 | $expected = 'klmnopqrstuvwxyz'; |
||
3339 | $this->assertEquals($expected, $result); |
||
3340 | |||
3341 | $string = 'abcdefghijklmnopqrstuvwxyz'; |
||
3342 | $find = 'k'; |
||
3343 | $result = Multibyte::strrchr($string, $find, true); |
||
3344 | $expected = 'abcdefghij'; |
||
3345 | $this->assertEquals($expected, $result); |
||
3346 | |||
3347 | $string = '。「」、・ヲァィゥェォャュョッーアイウエオカキク'; |
||
3348 | $find = 'ア'; |
||
3349 | $result = Multibyte::strrchr($string, $find); |
||
3350 | $expected = 'アイウエオカキク'; |
||
3351 | $this->assertEquals($expected, $result); |
||
3352 | |||
3353 | $string = '。「」、・ヲァィゥェォャュョッーアイウエオカキク'; |
||
3354 | $find = 'ア'; |
||
3355 | $result = Multibyte::strrchr($string, $find, true); |
||
3356 | $expected = '。「」、・ヲァィゥェォャュョッー'; |
||
3357 | $this->assertEquals($expected, $result); |
||
3358 | |||
3359 | $string = 'ケコサシスセソタチツテトナニヌネノハヒフヘホマミムメモヤユヨラリルレロワン゙'; |
||
3360 | $find = 'ハ'; |
||
3361 | $result = Multibyte::strrchr($string, $find); |
||
3362 | $expected = 'ハヒフヘホマミムメモヤユヨラリルレロワン゙'; |
||
3363 | $this->assertEquals($expected, $result); |
||
3364 | |||
3365 | $string = 'ケコサシスセソタチツテトナニヌネノハヒフヘホマミムメモヤユヨラリルレロワン゙'; |
||
3366 | $find = 'ハ'; |
||
3367 | $result = Multibyte::strrchr($string, $find, true); |
||
3368 | $expected = 'ケコサシスセソタチツテトナニヌネノ'; |
||
3369 | $this->assertEquals($expected, $result); |
||
3370 | |||
3371 | $string = 'Ĥēĺļŏ, Ŵőřļď!'; |
||
3372 | $find = 'ő'; |
||
3373 | $result = Multibyte::strrchr($string, $find); |
||
3374 | $expected = 'őřļď!'; |
||
3375 | $this->assertEquals($expected, $result); |
||
3376 | |||
3377 | $string = 'Ĥēĺļŏ, Ŵőřļď!'; |
||
3378 | $find = 'ő'; |
||
3379 | $result = Multibyte::strrchr($string, $find, true); |
||
3380 | $expected = 'Ĥēĺļŏ, Ŵ'; |
||
3381 | $this->assertEquals($expected, $result); |
||
3382 | |||
3383 | $string = 'Hello, World!'; |
||
3384 | $find = 'o'; |
||
3385 | $result = Multibyte::strrchr($string, $find); |
||
3386 | $expected = 'orld!'; |
||
3387 | $this->assertEquals($expected, $result); |
||
3388 | |||
3389 | $string = 'Hello, World!'; |
||
3390 | $find = 'o'; |
||
3391 | $result = Multibyte::strrchr($string, $find, true); |
||
3392 | $expected = 'Hello, W'; |
||
3393 | $this->assertEquals($expected, $result); |
||
3394 | |||
3395 | $string = 'Hello, World!'; |
||
3396 | $find = 'Wo'; |
||
3397 | $result = Multibyte::strrchr($string, $find); |
||
3398 | $expected = 'World!'; |
||
3399 | $this->assertEquals($expected, $result); |
||
3400 | |||
3401 | $string = 'Hello, World!'; |
||
3402 | $find = 'Wo'; |
||
3403 | $result = Multibyte::strrchr($string, $find, true); |
||
3404 | $expected = 'Hello, '; |
||
3405 | $this->assertEquals($expected, $result); |
||
3406 | |||
3407 | $string = 'Hello, World!'; |
||
3408 | $find = 'll'; |
||
3409 | $result = Multibyte::strrchr($string, $find); |
||
3410 | $expected = 'llo, World!'; |
||
3411 | $this->assertEquals($expected, $result); |
||
3412 | |||
3413 | $string = 'Hello, World!'; |
||
3414 | $find = 'll'; |
||
3415 | $result = Multibyte::strrchr($string, $find, true); |
||
3416 | $expected = 'He'; |
||
3417 | $this->assertEquals($expected, $result); |
||
3418 | |||
3419 | $string = 'Hello, World!'; |
||
3420 | $find = 'rld'; |
||
3421 | $result = Multibyte::strrchr($string, $find); |
||
3422 | $expected = 'rld!'; |
||
3423 | $this->assertEquals($expected, $result); |
||
3424 | |||
3425 | $string = 'Hello, World!'; |
||
3426 | $find = 'rld'; |
||
3427 | $result = Multibyte::strrchr($string, $find, true); |
||
3428 | $expected = 'Hello, Wo'; |
||
3429 | $this->assertEquals($expected, $result); |
||
3430 | |||
3431 | $string = 'čini'; |
||
3432 | $find = 'n'; |
||
3433 | $result = Multibyte::strrchr($string, $find); |
||
3434 | $expected = 'ni'; |
||
3435 | $this->assertEquals($expected, $result); |
||
3436 | |||
3437 | $string = 'čini'; |
||
3438 | $find = 'n'; |
||
3439 | $result = Multibyte::strrchr($string, $find, true); |
||
3440 | $expected = 'či'; |
||
3441 | $this->assertEquals($expected, $result); |
||
3442 | |||
3443 | $string = 'moći'; |
||
3444 | $find = 'ć'; |
||
3445 | $result = Multibyte::strrchr($string, $find); |
||
3446 | $expected = 'ći'; |
||
3447 | $this->assertEquals($expected, $result); |
||
3448 | |||
3449 | $string = 'moći'; |
||
3450 | $find = 'ć'; |
||
3451 | $result = Multibyte::strrchr($string, $find, true); |
||
3452 | $expected = 'mo'; |
||
3453 | $this->assertEquals($expected, $result); |
||
3454 | |||
3455 | $string = 'državni'; |
||
3456 | $find = 'ž'; |
||
3457 | $result = Multibyte::strrchr($string, $find); |
||
3458 | $expected = 'žavni'; |
||
3459 | $this->assertEquals($expected, $result); |
||
3460 | |||
3461 | $string = 'državni'; |
||
3462 | $find = 'ž'; |
||
3463 | $result = Multibyte::strrchr($string, $find, true); |
||
3464 | $expected = 'dr'; |
||
3465 | $this->assertEquals($expected, $result); |
||
3466 | |||
3467 | $string = '把百度设为首页'; |
||
3468 | $find = '设'; |
||
3469 | $result = Multibyte::strrchr($string, $find); |
||
3470 | $expected = '设为首页'; |
||
3471 | $this->assertEquals($expected, $result); |
||
3472 | |||
3473 | $string = '把百度设为首页'; |
||
3474 | $find = '设'; |
||
3475 | $result = Multibyte::strrchr($string, $find, true); |
||
3476 | $expected = '把百度'; |
||
3477 | $this->assertEquals($expected, $result); |
||
3478 | |||
3479 | $string = '一二三周永龍'; |
||
3480 | $find = '周'; |
||
3481 | $result = Multibyte::strrchr($string, $find); |
||
3482 | $expected = '周永龍'; |
||
3483 | $this->assertEquals($expected, $result); |
||
3484 | |||
3485 | $string = '一二三周永龍'; |
||
3486 | $find = '周'; |
||
3487 | $result = Multibyte::strrchr($string, $find, true); |
||
3488 | $expected = '一二三'; |
||
3489 | $this->assertEquals($expected, $result); |
||
3490 | |||
3491 | $string = '一二三周永龍'; |
||
3492 | $find = '周龍'; |
||
3493 | $result = Multibyte::strrchr($string, $find, true); |
||
3494 | $expected = false; |
||
3495 | $this->assertEquals($expected, $result); |
||
3496 | } |
||
3497 | |||
3498 | /**
|
||
3499 | * testUsingMbStrrichr method
|
||
3500 | *
|
||
3501 | * @return void
|
||
3502 | */
|
||
3503 | public function testUsingMbStrrichr() { |
||
3504 | $string = 'ABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789'; |
||
3505 | $find = 'F'; |
||
3506 | $result = mb_strrichr($string, $find); |
||
3507 | $expected = 'FGHIJKLMNOPQRSTUVWXYZ0123456789'; |
||
3508 | $this->assertEquals($expected, $result); |
||
3509 | |||
3510 | $string = 'ABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789'; |
||
3511 | $find = 'F'; |
||
3512 | $result = mb_strrichr($string, $find, true); |
||
3513 | $expected = 'ABCDE'; |
||
3514 | $this->assertEquals($expected, $result); |
||
3515 | |||
3516 | $string = 'ÀÁÂÃÄÅÆÇÈÉÊËÌÍÎÏÐÑÒÓÔÕÖØÙÚÛÜÝÞ'; |
||
3517 | $find = 'Å'; |
||
3518 | $result = mb_strrichr($string, $find); |
||
3519 | $expected = 'ÅÆÇÈÉÊËÌÍÎÏÐÑÒÓÔÕÖØÙÚÛÜÝÞ'; |
||
3520 | $this->assertEquals($expected, $result); |
||
3521 | |||
3522 | $string = 'ÀÁÂÃÄÅÆÇÈÉÊËÌÍÎÏÐÑÒÓÔÕÖØÙÚÛÜÝÞ'; |
||
3523 | $find = 'Å'; |
||
3524 | $result = mb_strrichr($string, $find, true); |
||
3525 | $expected = 'ÀÁÂÃÄ'; |
||
3526 | $this->assertEquals($expected, $result); |
||
3527 | |||
3528 | $string = 'ĀĂĄĆĈĊČĎĐĒĔĖĘĚĜĞĠĢĤĦĨĪĬĮIJĴĶĹĻĽĿŁŃŅŇŊŌŎŐŒŔŖŘŚŜŞŠŢŤŦŨŪŬŮŰŲŴŶŹŻŽ'; |
||
3529 | $find = 'Ċ'; |
||
3530 | $result = mb_strrichr($string, $find); |
||
3531 | $expected = 'ĊČĎĐĒĔĖĘĚĜĞĠĢĤĦĨĪĬĮIJĴĶĹĻĽĿŁŃŅŇŊŌŎŐŒŔŖŘŚŜŞŠŢŤŦŨŪŬŮŰŲŴŶŹŻŽ'; |
||
3532 | $this->assertEquals($expected, $result); |
||
3533 | |||
3534 | $string = 'ĀĂĄĆĈĊČĎĐĒĔĖĘĚĜĞĠĢĤĦĨĪĬĮIJĴĶĹĻĽĿŁŃŅŇŊŌŎŐŒŔŖŘŚŜŞŠŢŤŦŨŪŬŮŰŲŴŶŹŻŽ'; |
||
3535 | $find = 'Ċ'; |
||
3536 | $result = mb_strrichr($string, $find, true); |
||
3537 | $expected = 'ĀĂĄĆĈ'; |
||
3538 | $this->assertEquals($expected, $result); |
||
3539 | |||
3540 | $string = '!"#$%&\'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~'; |
||
3541 | $find = 'F'; |
||
3542 | $result = mb_strrichr($string, $find); |
||
3543 | $expected = 'fghijklmnopqrstuvwxyz{|}~'; |
||
3544 | $this->assertEquals($expected, $result); |
||
3545 | |||
3546 | $string = '!"#$%&\'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~'; |
||
3547 | $find = 'F'; |
||
3548 | $result = mb_strrichr($string, $find, true); |
||
3549 | $expected = '!"#$%&\'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcde'; |
||
3550 | $this->assertEquals($expected, $result); |
||
3551 | |||
3552 | $string = '¡¢£¤¥¦§¨©ª«¬®¯°±²³´µ¶·¸¹º»¼½¾¿ÀÁÂÃÄÅÆÇÈ'; |
||
3553 | $find = 'µ'; |
||
3554 | $result = mb_strrichr($string, $find); |
||
3555 | $expected = 'µ¶·¸¹º»¼½¾¿ÀÁÂÃÄÅÆÇÈ'; |
||
3556 | $this->assertEquals($expected, $result); |
||
3557 | |||
3558 | $string = '¡¢£¤¥¦§¨©ª«¬®¯°±²³´µ¶·¸¹º»¼½¾¿ÀÁÂÃÄÅÆÇÈ'; |
||
3559 | $find = 'µ'; |
||
3560 | $result = mb_strrichr($string, $find, true); |
||
3561 | $expected = '¡¢£¤¥¦§¨©ª«¬®¯°±²³´'; |
||
3562 | $this->assertEquals($expected, $result); |
||
3563 | |||
3564 | $string = 'ÉÊËÌÍÎÏÐÑÒÓÔÕÖ×ØÙÚÛÜÝÞßàáâãäåæçèéêëìíîïðñòóôõö÷øùúûüýþÿĀāĂ㥹ĆćĈĉĊċČčĎďĐđĒēĔĕĖėĘęĚěĜĝĞğĠġĢģĤĥĦħĨĩĪīĬ'; |
||
3565 | $find = 'Þ'; |
||
3566 | $result = mb_strrichr($string, $find); |
||
3567 | $expected = 'þÿĀāĂ㥹ĆćĈĉĊċČčĎďĐđĒēĔĕĖėĘęĚěĜĝĞğĠġĢģĤĥĦħĨĩĪīĬ'; |
||
3568 | $this->assertEquals($expected, $result); |
||
3569 | |||
3570 | $string = 'ÉÊËÌÍÎÏÐÑÒÓÔÕÖ×ØÙÚÛÜÝÞßàáâãäåæçèéêëìíîïðñòóôõö÷øùúûüýþÿĀāĂ㥹ĆćĈĉĊċČčĎďĐđĒēĔĕĖėĘęĚěĜĝĞğĠġĢģĤĥĦħĨĩĪīĬ'; |
||
3571 | $find = 'Þ'; |
||
3572 | $result = mb_strrichr($string, $find, true); |
||
3573 | $expected = 'ÉÊËÌÍÎÏÐÑÒÓÔÕÖ×ØÙÚÛÜÝÞßàáâãäåæçèéêëìíîïðñòóôõö÷øùúûüý'; |
||
3574 | $this->assertEquals($expected, $result); |
||
3575 | |||
3576 | $string = 'ĭĮįİıIJijĴĵĶķĸĹĺĻļĽľĿŀŁłŃńŅņŇňʼnŊŋŌōŎŏŐőŒœŔŕŖŗŘřŚśŜŝŞşŠšŢţŤťŦŧŨũŪūŬŭŮůŰűŲųŴŵŶŷŸŹźŻżŽžſƀƁƂƃƄƅƆƇƈƉƊƋƌƍƎƏƐ'; |
||
3577 | $find = 'Ņ'; |
||
3578 | $result = mb_strrichr($string, $find); |
||
3579 | $expected = 'ņŇňʼnŊŋŌōŎŏŐőŒœŔŕŖŗŘřŚśŜŝŞşŠšŢţŤťŦŧŨũŪūŬŭŮůŰűŲųŴŵŶŷŸŹźŻżŽžſƀƁƂƃƄƅƆƇƈƉƊƋƌƍƎƏƐ'; |
||
3580 | $this->assertEquals($expected, $result); |
||
3581 | |||
3582 | $string = 'ĭĮįİıIJijĴĵĶķĸĹĺĻļĽľĿŀŁłŃńŅņŇňʼnŊŋŌōŎŏŐőŒœŔŕŖŗŘřŚśŜŝŞşŠšŢţŤťŦŧŨũŪūŬŭŮůŰűŲųŴŵŶŷŸŹźŻżŽžſƀƁƂƃƄƅƆƇƈƉƊƋƌƍƎƏƐ'; |
||
3583 | $find = 'Ņ'; |
||
3584 | $result = mb_strrichr($string, $find, true); |
||
3585 | $expected = 'ĭĮįİıIJijĴĵĶķĸĹĺĻļĽľĿŀŁłŃńŅ'; |
||
3586 | $this->assertEquals($expected, $result); |
||
3587 | |||
3588 | $string = 'ƑƒƓƔƕƖƗƘƙƚƛƜƝƞƟƠơƢƣƤƥƦƧƨƩƪƫƬƭƮƯưƱƲƳƴƵƶƷƸƹƺƻƼƽƾƿǀǁǂǃDŽDždžLJLjljNJNjnjǍǎǏǐǑǒǓǔǕǖǗǘǙǚǛǜǝǞǟǠǡǢǣǤǥǦǧǨǩǪǫǬǭǮǯǰDZDzdzǴ'; |
||
3589 | $find = 'Ƹ'; |
||
3590 | $result = mb_strrichr($string, $find); |
||
3591 | $expected = 'ƹƺƻƼƽƾƿǀǁǂǃDŽDždžLJLjljNJNjnjǍǎǏǐǑǒǓǔǕǖǗǘǙǚǛǜǝǞǟǠǡǢǣǤǥǦǧǨǩǪǫǬǭǮǯǰDZDzdzǴ'; |
||
3592 | $this->assertEquals($expected, $result); |
||
3593 | |||
3594 | $find = 'Ƹ'; |
||
3595 | $result = mb_strrichr($string, $find, true); |
||
3596 | $expected = 'ƑƒƓƔƕƖƗƘƙƚƛƜƝƞƟƠơƢƣƤƥƦƧƨƩƪƫƬƭƮƯưƱƲƳƴƵƶƷƸ'; |
||
3597 | $this->assertEquals($expected, $result); |
||
3598 | |||
3599 | $string = 'əɚɛɜɝɞɟɠɡɢɣɤɥɦɧɨɩɪɫɬɭɮɯɰɱɲɳɴɵɶɷɸɹɺɻɼɽɾɿʀʁʂʃʄʅʆʇʈʉʊʋʌʍʎʏʐʑʒʓʔʕʖʗʘʙʚʛʜʝʞʟʠʡʢʣʤʥʦʧʨʩʪʫʬʭʮʯʰʱʲʳʴʵʶʷʸʹʺʻʼ'; |
||
3600 | $find = 'ʀ'; |
||
3601 | $result = mb_strrichr($string, $find); |
||
3602 | $expected = 'ʀʁʂʃʄʅʆʇʈʉʊʋʌʍʎʏʐʑʒʓʔʕʖʗʘʙʚʛʜʝʞʟʠʡʢʣʤʥʦʧʨʩʪʫʬʭʮʯʰʱʲʳʴʵʶʷʸʹʺʻʼ'; |
||
3603 | $this->assertEquals($expected, $result); |
||
3604 | |||
3605 | $string = 'əɚɛɜɝɞɟɠɡɢɣɤɥɦɧɨɩɪɫɬɭɮɯɰɱɲɳɴɵɶɷɸɹɺɻɼɽɾɿʀʁʂʃʄʅʆʇʈʉʊʋʌʍʎʏʐʑʒʓʔʕʖʗʘʙʚʛʜʝʞʟʠʡʢʣʤʥʦʧʨʩʪʫʬʭʮʯʰʱʲʳʴʵʶʷʸʹʺʻʼ'; |
||
3606 | $find = 'ʀ'; |
||
3607 | $result = mb_strrichr($string, $find, true); |
||
3608 | $expected = 'əɚɛɜɝɞɟɠɡɢɣɤɥɦɧɨɩɪɫɬɭɮɯɰɱɲɳɴɵɶɷɸɹɺɻɼɽɾɿ'; |
||
3609 | $this->assertEquals($expected, $result); |
||
3610 | |||
3611 | $string = 'ЀЁЂЃЄЅІЇЈЉЊЋЌЍЎЏАБВГДЕЖЗИЙКЛ'; |
||
3612 | $find = 'Ї'; |
||
3613 | $result = mb_strrichr($string, $find); |
||
3614 | $expected = 'ЇЈЉЊЋЌЍЎЏАБВГДЕЖЗИЙКЛ'; |
||
3615 | $this->assertEquals($expected, $result); |
||
3616 | |||
3617 | $string = 'ЀЁЂЃЄЅІЇЈЉЊЋЌЍЎЏАБВГДЕЖЗИЙКЛ'; |
||
3618 | $find = 'Ї'; |
||
3619 | $result = mb_strrichr($string, $find, true); |
||
3620 | $expected = 'ЀЁЂЃЄЅІ'; |
||
3621 | $this->assertEquals($expected, $result); |
||
3622 | |||
3623 | $string = 'МНОПРСТУФХЦЧШЩЪЫЬЭЮЯабвгдежзийклмнопрстуфхцчшщъыь'; |
||
3624 | $find = 'Р'; |
||
3625 | $result = mb_strrichr($string, $find); |
||
3626 | $expected = 'рстуфхцчшщъыь'; |
||
3627 | $this->assertEquals($expected, $result); |
||
3628 | |||
3629 | $string = 'МНОПРСТУФХЦЧШЩЪЫЬЭЮЯабвгдежзийклмноп'; |
||
3630 | $find = 'Р'; |
||
3631 | $result = mb_strrichr($string, $find, true); |
||
3632 | $expected = 'МНОП'; |
||
3633 | $this->assertEquals($expected, $result); |
||
3634 | |||
3635 | $string = 'فقكلمنهوىيًٌٍَُ'; |
||
3636 | $find = 'ن'; |
||
3637 | $result = mb_strrichr($string, $find); |
||
3638 | $expected = 'نهوىيًٌٍَُ'; |
||
3639 | $this->assertEquals($expected, $result); |
||
3640 | |||
3641 | $string = 'فقكلمنهوىيًٌٍَُ'; |
||
3642 | $find = 'ن'; |
||
3643 | $result = mb_strrichr($string, $find, true); |
||
3644 | $expected = 'فقكلم'; |
||
3645 | $this->assertEquals($expected, $result); |
||
3646 | |||
3647 | $string = '✰✱✲✳✴✵✶✷✸✹✺✻✼✽✾✿❀❁❂❃❄❅❆❇❈❉❊❋❌❍❎❏❐❑❒❓❔❕❖❗❘❙❚❛❜❝❞'; |
||
3648 | $find = '✿'; |
||
3649 | $result = mb_strrichr($string, $find); |
||
3650 | $expected = '✿❀❁❂❃❄❅❆❇❈❉❊❋❌❍❎❏❐❑❒❓❔❕❖❗❘❙❚❛❜❝❞'; |
||
3651 | $this->assertEquals($expected, $result); |
||
3652 | |||
3653 | $string = '✰✱✲✳✴✵✶✷✸✹✺✻✼✽✾✿❀❁❂❃❄❅❆❇❈❉❊❋❌❍❎❏❐❑❒❓❔❕❖❗❘❙❚❛❜❝❞'; |
||
3654 | $find = '✿'; |
||
3655 | $result = mb_strrichr($string, $find, true); |
||
3656 | $expected = '✰✱✲✳✴✵✶✷✸✹✺✻✼✽✾'; |
||
3657 | $this->assertEquals($expected, $result); |
||
3658 | |||
3659 | $string = '⺀⺁⺂⺃⺄⺅⺆⺇⺈⺉⺊⺋⺌⺍⺎⺏⺐⺑⺒⺓⺔⺕⺖⺗⺘⺙⺛⺜⺝⺞⺟⺠⺡⺢⺣⺤⺥⺦⺧⺨⺩⺪⺫⺬⺭⺮⺯⺰⺱⺲⺳⺴⺵⺶⺷⺸⺹⺺⺻⺼⺽⺾⺿⻀⻁⻂⻃⻄⻅⻆⻇⻈⻉⻊⻋⻌⻍⻎⻏⻐⻑⻒⻓⻔⻕⻖⻗⻘⻙⻚⻛⻜⻝⻞⻟⻠'; |
||
3660 | $find = '⺐'; |
||
3661 | $result = mb_strrichr($string, $find); |
||
3662 | $expected = '⺐⺑⺒⺓⺔⺕⺖⺗⺘⺙⺛⺜⺝⺞⺟⺠⺡⺢⺣⺤⺥⺦⺧⺨⺩⺪⺫⺬⺭⺮⺯⺰⺱⺲⺳⺴⺵⺶⺷⺸⺹⺺⺻⺼⺽⺾⺿⻀⻁⻂⻃⻄⻅⻆⻇⻈⻉⻊⻋⻌⻍⻎⻏⻐⻑⻒⻓⻔⻕⻖⻗⻘⻙⻚⻛⻜⻝⻞⻟⻠'; |
||
3663 | $this->assertEquals($expected, $result); |
||
3664 | |||
3665 | $string = '⺀⺁⺂⺃⺄⺅⺆⺇⺈⺉⺊⺋⺌⺍⺎⺏⺐⺑⺒⺓⺔⺕⺖⺗⺘⺙⺛⺜⺝⺞⺟⺠⺡⺢⺣⺤⺥⺦⺧⺨⺩⺪⺫⺬⺭⺮⺯⺰⺱⺲⺳⺴⺵⺶⺷⺸⺹⺺⺻⺼⺽⺾⺿⻀⻁⻂⻃⻄⻅⻆⻇⻈⻉⻊⻋⻌⻍⻎⻏⻐⻑⻒⻓⻔⻕⻖⻗⻘⻙⻚⻛⻜⻝⻞⻟⻠'; |
||
3666 | $find = '⺐'; |
||
3667 | $result = mb_strrichr($string, $find, true); |
||
3668 | $expected = '⺀⺁⺂⺃⺄⺅⺆⺇⺈⺉⺊⺋⺌⺍⺎⺏'; |
||
3669 | $this->assertEquals($expected, $result); |
||
3670 | |||
3671 | $string = '⽅⽆⽇⽈⽉⽊⽋⽌⽍⽎⽏⽐⽑⽒⽓⽔⽕⽖⽗⽘⽙⽚⽛⽜⽝⽞⽟⽠⽡⽢⽣⽤⽥⽦⽧⽨⽩⽪⽫⽬⽭⽮⽯⽰⽱⽲⽳⽴⽵⽶⽷⽸⽹⽺⽻⽼⽽⽾⽿'; |
||
3672 | $find = '⽤'; |
||
3673 | $result = mb_strrichr($string, $find); |
||
3674 | $expected = '⽤⽥⽦⽧⽨⽩⽪⽫⽬⽭⽮⽯⽰⽱⽲⽳⽴⽵⽶⽷⽸⽹⽺⽻⽼⽽⽾⽿'; |
||
3675 | $this->assertEquals($expected, $result); |
||
3676 | |||
3677 | $string = '⽅⽆⽇⽈⽉⽊⽋⽌⽍⽎⽏⽐⽑⽒⽓⽔⽕⽖⽗⽘⽙⽚⽛⽜⽝⽞⽟⽠⽡⽢⽣⽤⽥⽦⽧⽨⽩⽪⽫⽬⽭⽮⽯⽰⽱⽲⽳⽴⽵⽶⽷⽸⽹⽺⽻⽼⽽⽾⽿'; |
||
3678 | $find = '⽤'; |
||
3679 | $result = mb_strrichr($string, $find, true); |
||
3680 | $expected = '⽅⽆⽇⽈⽉⽊⽋⽌⽍⽎⽏⽐⽑⽒⽓⽔⽕⽖⽗⽘⽙⽚⽛⽜⽝⽞⽟⽠⽡⽢⽣'; |
||
3681 | $this->assertEquals($expected, $result); |
||
3682 | |||
3683 | $string = '눡눢눣눤눥눦눧눨눩눪눫눬눭눮눯눰눱눲눳눴눵눶눷눸눹눺눻눼눽눾눿뉀뉁뉂뉃뉄뉅뉆뉇뉈뉉뉊뉋뉌뉍뉎뉏뉐뉑뉒뉓뉔뉕뉖뉗뉘뉙뉚뉛뉜뉝뉞뉟뉠뉡뉢뉣뉤뉥뉦뉧뉨뉩뉪뉫뉬뉭뉮뉯뉰뉱뉲뉳뉴뉵뉶뉷뉸뉹뉺뉻뉼뉽뉾뉿늀늁늂늃늄'; |
||
3684 | $find = '눻'; |
||
3685 | $result = mb_strrichr($string, $find); |
||
3686 | $expected = '눻눼눽눾눿뉀뉁뉂뉃뉄뉅뉆뉇뉈뉉뉊뉋뉌뉍뉎뉏뉐뉑뉒뉓뉔뉕뉖뉗뉘뉙뉚뉛뉜뉝뉞뉟뉠뉡뉢뉣뉤뉥뉦뉧뉨뉩뉪뉫뉬뉭뉮뉯뉰뉱뉲뉳뉴뉵뉶뉷뉸뉹뉺뉻뉼뉽뉾뉿늀늁늂늃늄'; |
||
3687 | $this->assertEquals($expected, $result); |
||
3688 | |||
3689 | $string = '눡눢눣눤눥눦눧눨눩눪눫눬눭눮눯눰눱눲눳눴눵눶눷눸눹눺눻눼눽눾눿뉀뉁뉂뉃뉄뉅뉆뉇뉈뉉뉊뉋뉌뉍뉎뉏뉐뉑뉒뉓뉔뉕뉖뉗뉘뉙뉚뉛뉜뉝뉞뉟뉠뉡뉢뉣뉤뉥뉦뉧뉨뉩뉪뉫뉬뉭뉮뉯뉰뉱뉲뉳뉴뉵뉶뉷뉸뉹뉺뉻뉼뉽뉾뉿늀늁늂늃늄'; |
||
3690 | $find = '눻'; |
||
3691 | $result = mb_strrichr($string, $find, true); |
||
3692 | $expected = '눡눢눣눤눥눦눧눨눩눪눫눬눭눮눯눰눱눲눳눴눵눶눷눸눹눺'; |
||
3693 | $this->assertEquals($expected, $result); |
||
3694 | |||
3695 | $string = 'ﹰﹱﹲﹳﹴﹶﹷﹸﹹﹺﹻﹼﹽﹾﹿﺀﺁﺂﺃﺄﺅﺆﺇﺈﺉﺊﺋﺌﺍﺎﺏﺐﺑﺒﺓﺔﺕﺖﺗﺘﺙﺚﺛﺜﺝﺞﺟﺠﺡﺢﺣﺤﺥﺦﺧﺨﺩﺪﺫﺬﺭﺮﺯﺰ'; |
||
3696 | $find = 'ﺞ'; |
||
3697 | $result = mb_strrichr($string, $find); |
||
3698 | $expected = 'ﺞﺟﺠﺡﺢﺣﺤﺥﺦﺧﺨﺩﺪﺫﺬﺭﺮﺯﺰ'; |
||
3699 | $this->assertEquals($expected, $result); |
||
3700 | |||
3701 | $string = 'ﹰﹱﹲﹳﹴﹶﹷﹸﹹﹺﹻﹼﹽﹾﹿﺀﺁﺂﺃﺄﺅﺆﺇﺈﺉﺊﺋﺌﺍﺎﺏﺐﺑﺒﺓﺔﺕﺖﺗﺘﺙﺚﺛﺜﺝﺞﺟﺠﺡﺢﺣﺤﺥﺦﺧﺨﺩﺪﺫﺬﺭﺮﺯﺰ'; |
||
3702 | $find = 'ﺞ'; |
||
3703 | $result = mb_strrichr($string, $find, true); |
||
3704 | $expected = 'ﹰﹱﹲﹳﹴﹶﹷﹸﹹﹺﹻﹼﹽﹾﹿﺀﺁﺂﺃﺄﺅﺆﺇﺈﺉﺊﺋﺌﺍﺎﺏﺐﺑﺒﺓﺔﺕﺖﺗﺘﺙﺚﺛﺜﺝ'; |
||
3705 | $this->assertEquals($expected, $result); |
||
3706 | |||
3707 | $string = 'ﺱﺲﺳﺴﺵﺶﺷﺸﺹﺺﺻﺼﺽﺾﺿﻀﻁﻂﻃﻄﻅﻆﻇﻈﻉﻊﻋﻌﻍﻎﻏﻐﻑﻒﻓﻔﻕﻖﻗﻘﻙﻚﻛﻜﻝﻞﻟﻠﻡﻢﻣﻤﻥﻦﻧﻨﻩﻪﻫﻬﻭﻮﻯﻰﻱﻲﻳﻴﻵﻶﻷﻸﻹﻺﻻﻼ'; |
||
3708 | $find = 'ﻞ'; |
||
3709 | $result = mb_strrichr($string, $find); |
||
3710 | $expected = 'ﻞﻟﻠﻡﻢﻣﻤﻥﻦﻧﻨﻩﻪﻫﻬﻭﻮﻯﻰﻱﻲﻳﻴﻵﻶﻷﻸﻹﻺﻻﻼ'; |
||
3711 | $this->assertEquals($expected, $result); |
||
3712 | |||
3713 | $string = 'ﺱﺲﺳﺴﺵﺶﺷﺸﺹﺺﺻﺼﺽﺾﺿﻀﻁﻂﻃﻄﻅﻆﻇﻈﻉﻊﻋﻌﻍﻎﻏﻐﻑﻒﻓﻔﻕﻖﻗﻘﻙﻚﻛﻜﻝﻞﻟﻠﻡﻢﻣﻤﻥﻦﻧﻨﻩﻪﻫﻬﻭﻮﻯﻰﻱﻲﻳﻴﻵﻶﻷﻸﻹﻺﻻﻼ'; |
||
3714 | $find = 'ﻞ'; |
||
3715 | $result = mb_strrichr($string, $find, true); |
||
3716 | $expected = 'ﺱﺲﺳﺴﺵﺶﺷﺸﺹﺺﺻﺼﺽﺾﺿﻀﻁﻂﻃﻄﻅﻆﻇﻈﻉﻊﻋﻌﻍﻎﻏﻐﻑﻒﻓﻔﻕﻖﻗﻘﻙﻚﻛﻜﻝ'; |
||
3717 | $this->assertEquals($expected, $result); |
||
3718 | |||
3719 | $string = 'abcdefghijklmnopqrstuvwxyz'; |
||
3720 | $find = 'k'; |
||
3721 | $result = mb_strrichr($string, $find); |
||
3722 | $expected = 'klmnopqrstuvwxyz'; |
||
3723 | $this->assertEquals($expected, $result); |
||
3724 | |||
3725 | $string = 'abcdefghijklmnopqrstuvwxyz'; |
||
3726 | $find = 'k'; |
||
3727 | $result = mb_strrichr($string, $find, true); |
||
3728 | $expected = 'abcdefghij'; |
||
3729 | $this->assertEquals($expected, $result); |
||
3730 | |||
3731 | $string = '。「」、・ヲァィゥェォャュョッーアイウエオカキク'; |
||
3732 | $find = 'ア'; |
||
3733 | $result = mb_strrichr($string, $find); |
||
3734 | $expected = 'アイウエオカキク'; |
||
3735 | $this->assertEquals($expected, $result); |
||
3736 | |||
3737 | $string = '。「」、・ヲァィゥェォャュョッーアイウエオカキク'; |
||
3738 | $find = 'ア'; |
||
3739 | $result = mb_strrichr($string, $find, true); |
||
3740 | $expected = '。「」、・ヲァィゥェォャュョッー'; |
||
3741 | $this->assertEquals($expected, $result); |
||
3742 | |||
3743 | $string = 'ケコサシスセソタチツテトナニヌネノハヒフヘホマミムメモヤユヨラリルレロワン゙'; |
||
3744 | $find = 'ハ'; |
||
3745 | $result = mb_strrichr($string, $find); |
||
3746 | $expected = 'ハヒフヘホマミムメモヤユヨラリルレロワン゙'; |
||
3747 | $this->assertEquals($expected, $result); |
||
3748 | |||
3749 | $string = 'ケコサシスセソタチツテトナニヌネノハヒフヘホマミムメモヤユヨラリルレロワン゙'; |
||
3750 | $find = 'ハ'; |
||
3751 | $result = mb_strrichr($string, $find, true); |
||
3752 | $expected = 'ケコサシスセソタチツテトナニヌネノ'; |
||
3753 | $this->assertEquals($expected, $result); |
||
3754 | |||
3755 | $string = 'Ĥēĺļŏ, Ŵőřļď!'; |
||
3756 | $find = 'ő'; |
||
3757 | $result = mb_strrichr($string, $find); |
||
3758 | $expected = 'őřļď!'; |
||
3759 | $this->assertEquals($expected, $result); |
||
3760 | |||
3761 | $string = 'Ĥēĺļŏ, Ŵőřļď!'; |
||
3762 | $find = 'ő'; |
||
3763 | $result = mb_strrichr($string, $find, true); |
||
3764 | $expected = 'Ĥēĺļŏ, Ŵ'; |
||
3765 | $this->assertEquals($expected, $result); |
||
3766 | |||
3767 | $string = 'Hello, World!'; |
||
3768 | $find = 'o'; |
||
3769 | $result = mb_strrichr($string, $find); |
||
3770 | $expected = 'orld!'; |
||
3771 | $this->assertEquals($expected, $result); |
||
3772 | |||
3773 | $string = 'Hello, World!'; |
||
3774 | $find = 'o'; |
||
3775 | $result = mb_strrichr($string, $find, true); |
||
3776 | $expected = 'Hello, W'; |
||
3777 | $this->assertEquals($expected, $result); |
||
3778 | |||
3779 | $string = 'Hello, World!'; |
||
3780 | $find = 'Wo'; |
||
3781 | $result = mb_strrichr($string, $find); |
||
3782 | $expected = 'World!'; |
||
3783 | $this->assertEquals($expected, $result); |
||
3784 | |||
3785 | $string = 'Hello, World!'; |
||
3786 | $find = 'Wo'; |
||
3787 | $result = mb_strrichr($string, $find, true); |
||
3788 | $expected = 'Hello, '; |
||
3789 | $this->assertEquals($expected, $result); |
||
3790 | |||
3791 | $string = 'Hello, World!'; |
||
3792 | $find = 'll'; |
||
3793 | $result = mb_strrichr($string, $find); |
||
3794 | $expected = 'llo, World!'; |
||
3795 | $this->assertEquals($expected, $result); |
||
3796 | |||
3797 | $string = 'Hello, World!'; |
||
3798 | $find = 'll'; |
||
3799 | $result = mb_strrichr($string, $find, true); |
||
3800 | $expected = 'He'; |
||
3801 | $this->assertEquals($expected, $result); |
||
3802 | |||
3803 | $string = 'Hello, World!'; |
||
3804 | $find = 'rld'; |
||
3805 | $result = mb_strrichr($string, $find); |
||
3806 | $expected = 'rld!'; |
||
3807 | $this->assertEquals($expected, $result); |
||
3808 | |||
3809 | $string = 'Hello, World!'; |
||
3810 | $find = 'rld'; |
||
3811 | $result = mb_strrichr($string, $find, true); |
||
3812 | $expected = 'Hello, Wo'; |
||
3813 | $this->assertEquals($expected, $result); |
||
3814 | |||
3815 | $string = 'čini'; |
||
3816 | $find = 'n'; |
||
3817 | $result = mb_strrichr($string, $find); |
||
3818 | $expected = 'ni'; |
||
3819 | $this->assertEquals($expected, $result); |
||
3820 | |||
3821 | $string = 'čini'; |
||
3822 | $find = 'n'; |
||
3823 | $result = mb_strrichr($string, $find, true); |
||
3824 | $expected = 'či'; |
||
3825 | $this->assertEquals($expected, $result); |
||
3826 | |||
3827 | $string = 'moći'; |
||
3828 | $find = 'ć'; |
||
3829 | $result = mb_strrichr($string, $find); |
||
3830 | $expected = 'ći'; |
||
3831 | $this->assertEquals($expected, $result); |
||
3832 | |||
3833 | $string = 'moći'; |
||
3834 | $find = 'ć'; |
||
3835 | $result = mb_strrichr($string, $find, true); |
||
3836 | $expected = 'mo'; |
||
3837 | $this->assertEquals($expected, $result); |
||
3838 | |||
3839 | $string = 'državni'; |
||
3840 | $find = 'ž'; |
||
3841 | $result = mb_strrichr($string, $find); |
||
3842 | $expected = 'žavni'; |
||
3843 | $this->assertEquals($expected, $result); |
||
3844 | |||
3845 | $string = 'državni'; |
||
3846 | $find = 'ž'; |
||
3847 | $result = mb_strrichr($string, $find, true); |
||
3848 | $expected = 'dr'; |
||
3849 | $this->assertEquals($expected, $result); |
||
3850 | |||
3851 | $string = '把百度设为首页'; |
||
3852 | $find = '设'; |
||
3853 | $result = mb_strrichr($string, $find); |
||
3854 | $expected = '设为首页'; |
||
3855 | $this->assertEquals($expected, $result); |
||
3856 | |||
3857 | $string = '把百度设为首页'; |
||
3858 | $find = '设'; |
||
3859 | $result = mb_strrichr($string, $find, true); |
||
3860 | $expected = '把百度'; |
||
3861 | $this->assertEquals($expected, $result); |
||
3862 | |||
3863 | $string = '一二三周永龍'; |
||
3864 | $find = '周'; |
||
3865 | $result = mb_strrichr($string, $find); |
||
3866 | $expected = '周永龍'; |
||
3867 | $this->assertEquals($expected, $result); |
||
3868 | |||
3869 | $string = '一二三周永龍'; |
||
3870 | $find = '周'; |
||
3871 | $result = mb_strrichr($string, $find, true); |
||
3872 | $expected = '一二三'; |
||
3873 | $this->assertEquals($expected, $result); |
||
3874 | |||
3875 | $string = '把百度设为首页'; |
||
3876 | $find = '百设'; |
||
3877 | $result = mb_strrichr($string, $find, true); |
||
3878 | $expected = false; |
||
3879 | $this->assertEquals($expected, $result); |
||
3880 | } |
||
3881 | |||
3882 | /**
|
||
3883 | * testMultibyteStrrichr method
|
||
3884 | *
|
||
3885 | * @return void
|
||
3886 | */
|
||
3887 | public function testMultibyteStrrichr() { |
||
3888 | $string = 'ABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789'; |
||
3889 | $find = 'F'; |
||
3890 | $result = Multibyte::strrichr($string, $find); |
||
3891 | $expected = 'FGHIJKLMNOPQRSTUVWXYZ0123456789'; |
||
3892 | $this->assertEquals($expected, $result); |
||
3893 | |||
3894 | $string = 'ABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789'; |
||
3895 | $find = 'F'; |
||
3896 | $result = Multibyte::strrichr($string, $find, true); |
||
3897 | $expected = 'ABCDE'; |
||
3898 | $this->assertEquals($expected, $result); |
||
3899 | |||
3900 | $string = 'ÀÁÂÃÄÅÆÇÈÉÊËÌÍÎÏÐÑÒÓÔÕÖØÙÚÛÜÝÞ'; |
||
3901 | $find = 'Å'; |
||
3902 | $result = Multibyte::strrichr($string, $find); |
||
3903 | $expected = 'ÅÆÇÈÉÊËÌÍÎÏÐÑÒÓÔÕÖØÙÚÛÜÝÞ'; |
||
3904 | $this->assertEquals($expected, $result); |
||
3905 | |||
3906 | $string = 'ÀÁÂÃÄÅÆÇÈÉÊËÌÍÎÏÐÑÒÓÔÕÖØÙÚÛÜÝÞ'; |
||
3907 | $find = 'Å'; |
||
3908 | $result = Multibyte::strrichr($string, $find, true); |
||
3909 | $expected = 'ÀÁÂÃÄ'; |
||
3910 | $this->assertEquals($expected, $result); |
||
3911 | |||
3912 | $string = 'ĀĂĄĆĈĊČĎĐĒĔĖĘĚĜĞĠĢĤĦĨĪĬĮIJĴĶĹĻĽĿŁŃŅŇŊŌŎŐŒŔŖŘŚŜŞŠŢŤŦŨŪŬŮŰŲŴŶŹŻŽ'; |
||
3913 | $find = 'Ċ'; |
||
3914 | $result = Multibyte::strrichr($string, $find); |
||
3915 | $expected = 'ĊČĎĐĒĔĖĘĚĜĞĠĢĤĦĨĪĬĮIJĴĶĹĻĽĿŁŃŅŇŊŌŎŐŒŔŖŘŚŜŞŠŢŤŦŨŪŬŮŰŲŴŶŹŻŽ'; |
||
3916 | $this->assertEquals($expected, $result); |
||
3917 | |||
3918 | $string = 'ĀĂĄĆĈĊČĎĐĒĔĖĘĚĜĞĠĢĤĦĨĪĬĮIJĴĶĹĻĽĿŁŃŅŇŊŌŎŐŒŔŖŘŚŜŞŠŢŤŦŨŪŬŮŰŲŴŶŹŻŽ'; |
||
3919 | $find = 'Ċ'; |
||
3920 | $result = Multibyte::strrichr($string, $find, true); |
||
3921 | $expected = 'ĀĂĄĆĈ'; |
||
3922 | $this->assertEquals($expected, $result); |
||
3923 | |||
3924 | $string = '!"#$%&\'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~'; |
||
3925 | $find = 'F'; |
||
3926 | $result = Multibyte::strrichr($string, $find); |
||
3927 | $expected = 'fghijklmnopqrstuvwxyz{|}~'; |
||
3928 | $this->assertEquals($expected, $result); |
||
3929 | |||
3930 | $string = '!"#$%&\'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~'; |
||
3931 | $find = 'F'; |
||
3932 | $result = Multibyte::strrichr($string, $find, true); |
||
3933 | $expected = '!"#$%&\'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcde'; |
||
3934 | $this->assertEquals($expected, $result); |
||
3935 | |||
3936 | $string = '¡¢£¤¥¦§¨©ª«¬®¯°±²³´µ¶·¸¹º»¼½¾¿ÀÁÂÃÄÅÆÇÈ'; |
||
3937 | $find = 'µ'; |
||
3938 | $result = Multibyte::strrichr($string, $find); |
||
3939 | $expected = 'µ¶·¸¹º»¼½¾¿ÀÁÂÃÄÅÆÇÈ'; |
||
3940 | $this->assertEquals($expected, $result); |
||
3941 | |||
3942 | $string = '¡¢£¤¥¦§¨©ª«¬®¯°±²³´µ¶·¸¹º»¼½¾¿ÀÁÂÃÄÅÆÇÈ'; |
||
3943 | $find = 'µ'; |
||
3944 | $result = Multibyte::strrichr($string, $find, true); |
||
3945 | $expected = '¡¢£¤¥¦§¨©ª«¬®¯°±²³´'; |
||
3946 | $this->assertEquals($expected, $result); |
||
3947 | |||
3948 | $string = 'ÉÊËÌÍÎÏÐÑÒÓÔÕÖ×ØÙÚÛÜÝÞßàáâãäåæçèéêëìíîïðñòóôõö÷øùúûüýþÿĀāĂ㥹ĆćĈĉĊċČčĎďĐđĒēĔĕĖėĘęĚěĜĝĞğĠġĢģĤĥĦħĨĩĪīĬ'; |
||
3949 | $find = 'Þ'; |
||
3950 | $result = Multibyte::strrichr($string, $find); |
||
3951 | $expected = 'þÿĀāĂ㥹ĆćĈĉĊċČčĎďĐđĒēĔĕĖėĘęĚěĜĝĞğĠġĢģĤĥĦħĨĩĪīĬ'; |
||
3952 | $this->assertEquals($expected, $result); |
||
3953 | |||
3954 | $string = 'ÉÊËÌÍÎÏÐÑÒÓÔÕÖ×ØÙÚÛÜÝÞßàáâãäåæçèéêëìíîïðñòóôõö÷øùúûüýþÿĀāĂ㥹ĆćĈĉĊċČčĎďĐđĒēĔĕĖėĘęĚěĜĝĞğĠġĢģĤĥĦħĨĩĪīĬ'; |
||
3955 | $find = 'Þ'; |
||
3956 | $result = Multibyte::strrichr($string, $find, true); |
||
3957 | $expected = 'ÉÊËÌÍÎÏÐÑÒÓÔÕÖ×ØÙÚÛÜÝÞßàáâãäåæçèéêëìíîïðñòóôõö÷øùúûüý'; |
||
3958 | $this->assertEquals($expected, $result); |
||
3959 | |||
3960 | $string = 'ĭĮįİıIJijĴĵĶķĸĹĺĻļĽľĿŀŁłŃńŅņŇňʼnŊŋŌōŎŏŐőŒœŔŕŖŗŘřŚśŜŝŞşŠšŢţŤťŦŧŨũŪūŬŭŮůŰűŲųŴŵŶŷŸŹźŻżŽžſƀƁƂƃƄƅƆƇƈƉƊƋƌƍƎƏƐ'; |
||
3961 | $find = 'Ņ'; |
||
3962 | $result = Multibyte::strrichr($string, $find); |
||
3963 | $expected = 'ņŇňʼnŊŋŌōŎŏŐőŒœŔŕŖŗŘřŚśŜŝŞşŠšŢţŤťŦŧŨũŪūŬŭŮůŰűŲųŴŵŶŷŸŹźŻżŽžſƀƁƂƃƄƅƆƇƈƉƊƋƌƍƎƏƐ'; |
||
3964 | $this->assertEquals($expected, $result); |
||
3965 | |||
3966 | $string = 'ĭĮįİıIJijĴĵĶķĸĹĺĻļĽľĿŀŁłŃńŅņŇňʼnŊŋŌōŎŏŐőŒœŔŕŖŗŘřŚśŜŝŞşŠšŢţŤťŦŧŨũŪūŬŭŮůŰűŲųŴŵŶŷŸŹźŻżŽžſƀƁƂƃƄƅƆƇƈƉƊƋƌƍƎƏƐ'; |
||
3967 | $find = 'Ņ'; |
||
3968 | $result = Multibyte::strrichr($string, $find, true); |
||
3969 | $expected = 'ĭĮįİıIJijĴĵĶķĸĹĺĻļĽľĿŀŁłŃńŅ'; |
||
3970 | $this->assertEquals($expected, $result); |
||
3971 | |||
3972 | $string = 'ƑƒƓƔƕƖƗƘƙƚƛƜƝƞƟƠơƢƣƤƥƦƧƨƩƪƫƬƭƮƯưƱƲƳƴƵƶƷƸƹƺƻƼƽƾƿǀǁǂǃDŽDždžLJLjljNJNjnjǍǎǏǐǑǒǓǔǕǖǗǘǙǚǛǜǝǞǟǠǡǢǣǤǥǦǧǨǩǪǫǬǭǮǯǰDZDzdzǴ'; |
||
3973 | $find = 'Ƹ'; |
||
3974 | $result = Multibyte::strrichr($string, $find); |
||
3975 | $expected = 'ƹƺƻƼƽƾƿǀǁǂǃDŽDždžLJLjljNJNjnjǍǎǏǐǑǒǓǔǕǖǗǘǙǚǛǜǝǞǟǠǡǢǣǤǥǦǧǨǩǪǫǬǭǮǯǰDZDzdzǴ'; |
||
3976 | $this->assertEquals($expected, $result); |
||
3977 | |||
3978 | $find = 'Ƹ'; |
||
3979 | $result = Multibyte::strrichr($string, $find, true); |
||
3980 | $expected = 'ƑƒƓƔƕƖƗƘƙƚƛƜƝƞƟƠơƢƣƤƥƦƧƨƩƪƫƬƭƮƯưƱƲƳƴƵƶƷƸ'; |
||
3981 | $this->assertEquals($expected, $result); |
||
3982 | |||
3983 | $string = 'əɚɛɜɝɞɟɠɡɢɣɤɥɦɧɨɩɪɫɬɭɮɯɰɱɲɳɴɵɶɷɸɹɺɻɼɽɾɿʀʁʂʃʄʅʆʇʈʉʊʋʌʍʎʏʐʑʒʓʔʕʖʗʘʙʚʛʜʝʞʟʠʡʢʣʤʥʦʧʨʩʪʫʬʭʮʯʰʱʲʳʴʵʶʷʸʹʺʻʼ'; |
||
3984 | $find = 'ʀ'; |
||
3985 | $result = Multibyte::strrichr($string, $find); |
||
3986 | $expected = 'ʀʁʂʃʄʅʆʇʈʉʊʋʌʍʎʏʐʑʒʓʔʕʖʗʘʙʚʛʜʝʞʟʠʡʢʣʤʥʦʧʨʩʪʫʬʭʮʯʰʱʲʳʴʵʶʷʸʹʺʻʼ'; |
||
3987 | $this->assertEquals($expected, $result); |
||
3988 | |||
3989 | $string = 'əɚɛɜɝɞɟɠɡɢɣɤɥɦɧɨɩɪɫɬɭɮɯɰɱɲɳɴɵɶɷɸɹɺɻɼɽɾɿʀʁʂʃʄʅʆʇʈʉʊʋʌʍʎʏʐʑʒʓʔʕʖʗʘʙʚʛʜʝʞʟʠʡʢʣʤʥʦʧʨʩʪʫʬʭʮʯʰʱʲʳʴʵʶʷʸʹʺʻʼ'; |
||
3990 | $find = 'ʀ'; |
||
3991 | $result = Multibyte::strrichr($string, $find, true); |
||
3992 | $expected = 'əɚɛɜɝɞɟɠɡɢɣɤɥɦɧɨɩɪɫɬɭɮɯɰɱɲɳɴɵɶɷɸɹɺɻɼɽɾɿ'; |
||
3993 | $this->assertEquals($expected, $result); |
||
3994 | |||
3995 | $string = 'ЀЁЂЃЄЅІЇЈЉЊЋЌЍЎЏАБВГДЕЖЗИЙКЛ'; |
||
3996 | $find = 'Ї'; |
||
3997 | $result = Multibyte::strrichr($string, $find); |
||
3998 | $expected = 'ЇЈЉЊЋЌЍЎЏАБВГДЕЖЗИЙКЛ'; |
||
3999 | $this->assertEquals($expected, $result); |
||
4000 | |||
4001 | $string = 'ЀЁЂЃЄЅІЇЈЉЊЋЌЍЎЏАБВГДЕЖЗИЙКЛ'; |
||
4002 | $find = 'Ї'; |
||
4003 | $result = Multibyte::strrichr($string, $find, true); |
||
4004 | $expected = 'ЀЁЂЃЄЅІ'; |
||
4005 | $this->assertEquals($expected, $result); |
||
4006 | |||
4007 | $string = 'МНОПРСТУФХЦЧШЩЪЫЬЭЮЯабвгдежзийклмнопрстуфхцчшщъыь'; |
||
4008 | $find = 'Р'; |
||
4009 | $result = Multibyte::strrichr($string, $find); |
||
4010 | $expected = 'рстуфхцчшщъыь'; |
||
4011 | $this->assertEquals($expected, $result); |
||
4012 | |||
4013 | $string = 'МНОПРСТУФХЦЧШЩЪЫЬЭЮЯабвгдежзийклмноп'; |
||
4014 | $find = 'Р'; |
||
4015 | $result = Multibyte::strrichr($string, $find, true); |
||
4016 | $expected = 'МНОП'; |
||
4017 | $this->assertEquals($expected, $result); |
||
4018 | |||
4019 | $string = 'فقكلمنهوىيًٌٍَُ'; |
||
4020 | $find = 'ن'; |
||
4021 | $result = Multibyte::strrichr($string, $find); |
||
4022 | $expected = 'نهوىيًٌٍَُ'; |
||
4023 | $this->assertEquals($expected, $result); |
||
4024 | |||
4025 | $string = 'فقكلمنهوىيًٌٍَُ'; |
||
4026 | $find = 'ن'; |
||
4027 | $result = Multibyte::strrichr($string, $find, true); |
||
4028 | $expected = 'فقكلم'; |
||
4029 | $this->assertEquals($expected, $result); |
||
4030 | |||
4031 | $string = '✰✱✲✳✴✵✶✷✸✹✺✻✼✽✾✿❀❁❂❃❄❅❆❇❈❉❊❋❌❍❎❏❐❑❒❓❔❕❖❗❘❙❚❛❜❝❞'; |
||
4032 | $find = '✿'; |
||
4033 | $result = Multibyte::strrichr($string, $find); |
||
4034 | $expected = '✿❀❁❂❃❄❅❆❇❈❉❊❋❌❍❎❏❐❑❒❓❔❕❖❗❘❙❚❛❜❝❞'; |
||
4035 | $this->assertEquals($expected, $result); |
||
4036 | |||
4037 | $string = '✰✱✲✳✴✵✶✷✸✹✺✻✼✽✾✿❀❁❂❃❄❅❆❇❈❉❊❋❌❍❎❏❐❑❒❓❔❕❖❗❘❙❚❛❜❝❞'; |
||
4038 | $find = '✿'; |
||
4039 | $result = Multibyte::strrichr($string, $find, true); |
||
4040 | $expected = '✰✱✲✳✴✵✶✷✸✹✺✻✼✽✾'; |
||
4041 | $this->assertEquals($expected, $result); |
||
4042 | |||
4043 | $string = '⺀⺁⺂⺃⺄⺅⺆⺇⺈⺉⺊⺋⺌⺍⺎⺏⺐⺑⺒⺓⺔⺕⺖⺗⺘⺙⺛⺜⺝⺞⺟⺠⺡⺢⺣⺤⺥⺦⺧⺨⺩⺪⺫⺬⺭⺮⺯⺰⺱⺲⺳⺴⺵⺶⺷⺸⺹⺺⺻⺼⺽⺾⺿⻀⻁⻂⻃⻄⻅⻆⻇⻈⻉⻊⻋⻌⻍⻎⻏⻐⻑⻒⻓⻔⻕⻖⻗⻘⻙⻚⻛⻜⻝⻞⻟⻠'; |
||
4044 | $find = '⺐'; |
||
4045 | $result = Multibyte::strrichr($string, $find); |
||
4046 | $expected = '⺐⺑⺒⺓⺔⺕⺖⺗⺘⺙⺛⺜⺝⺞⺟⺠⺡⺢⺣⺤⺥⺦⺧⺨⺩⺪⺫⺬⺭⺮⺯⺰⺱⺲⺳⺴⺵⺶⺷⺸⺹⺺⺻⺼⺽⺾⺿⻀⻁⻂⻃⻄⻅⻆⻇⻈⻉⻊⻋⻌⻍⻎⻏⻐⻑⻒⻓⻔⻕⻖⻗⻘⻙⻚⻛⻜⻝⻞⻟⻠'; |
||
4047 | $this->assertEquals($expected, $result); |
||
4048 | |||
4049 | $string = '⺀⺁⺂⺃⺄⺅⺆⺇⺈⺉⺊⺋⺌⺍⺎⺏⺐⺑⺒⺓⺔⺕⺖⺗⺘⺙⺛⺜⺝⺞⺟⺠⺡⺢⺣⺤⺥⺦⺧⺨⺩⺪⺫⺬⺭⺮⺯⺰⺱⺲⺳⺴⺵⺶⺷⺸⺹⺺⺻⺼⺽⺾⺿⻀⻁⻂⻃⻄⻅⻆⻇⻈⻉⻊⻋⻌⻍⻎⻏⻐⻑⻒⻓⻔⻕⻖⻗⻘⻙⻚⻛⻜⻝⻞⻟⻠'; |
||
4050 | $find = '⺐'; |
||
4051 | $result = Multibyte::strrichr($string, $find, true); |
||
4052 | $expected = '⺀⺁⺂⺃⺄⺅⺆⺇⺈⺉⺊⺋⺌⺍⺎⺏'; |
||
4053 | $this->assertEquals($expected, $result); |
||
4054 | |||
4055 | $string = '⽅⽆⽇⽈⽉⽊⽋⽌⽍⽎⽏⽐⽑⽒⽓⽔⽕⽖⽗⽘⽙⽚⽛⽜⽝⽞⽟⽠⽡⽢⽣⽤⽥⽦⽧⽨⽩⽪⽫⽬⽭⽮⽯⽰⽱⽲⽳⽴⽵⽶⽷⽸⽹⽺⽻⽼⽽⽾⽿'; |
||
4056 | $find = '⽤'; |
||
4057 | $result = Multibyte::strrichr($string, $find); |
||
4058 | $expected = '⽤⽥⽦⽧⽨⽩⽪⽫⽬⽭⽮⽯⽰⽱⽲⽳⽴⽵⽶⽷⽸⽹⽺⽻⽼⽽⽾⽿'; |
||
4059 | $this->assertEquals($expected, $result); |
||
4060 | |||
4061 | $string = '⽅⽆⽇⽈⽉⽊⽋⽌⽍⽎⽏⽐⽑⽒⽓⽔⽕⽖⽗⽘⽙⽚⽛⽜⽝⽞⽟⽠⽡⽢⽣⽤⽥⽦⽧⽨⽩⽪⽫⽬⽭⽮⽯⽰⽱⽲⽳⽴⽵⽶⽷⽸⽹⽺⽻⽼⽽⽾⽿'; |
||
4062 | $find = '⽤'; |
||
4063 | $result = Multibyte::strrichr($string, $find, true); |
||
4064 | $expected = '⽅⽆⽇⽈⽉⽊⽋⽌⽍⽎⽏⽐⽑⽒⽓⽔⽕⽖⽗⽘⽙⽚⽛⽜⽝⽞⽟⽠⽡⽢⽣'; |
||
4065 | $this->assertEquals($expected, $result); |
||
4066 | |||
4067 | $string = '눡눢눣눤눥눦눧눨눩눪눫눬눭눮눯눰눱눲눳눴눵눶눷눸눹눺눻눼눽눾눿뉀뉁뉂뉃뉄뉅뉆뉇뉈뉉뉊뉋뉌뉍뉎뉏뉐뉑뉒뉓뉔뉕뉖뉗뉘뉙뉚뉛뉜뉝뉞뉟뉠뉡뉢뉣뉤뉥뉦뉧뉨뉩뉪뉫뉬뉭뉮뉯뉰뉱뉲뉳뉴뉵뉶뉷뉸뉹뉺뉻뉼뉽뉾뉿늀늁늂늃늄'; |
||
4068 | $find = '눻'; |
||
4069 | $result = Multibyte::strrichr($string, $find); |
||
4070 | $expected = '눻눼눽눾눿뉀뉁뉂뉃뉄뉅뉆뉇뉈뉉뉊뉋뉌뉍뉎뉏뉐뉑뉒뉓뉔뉕뉖뉗뉘뉙뉚뉛뉜뉝뉞뉟뉠뉡뉢뉣뉤뉥뉦뉧뉨뉩뉪뉫뉬뉭뉮뉯뉰뉱뉲뉳뉴뉵뉶뉷뉸뉹뉺뉻뉼뉽뉾뉿늀늁늂늃늄'; |
||
4071 | $this->assertEquals($expected, $result); |
||
4072 | |||
4073 | $string = '눡눢눣눤눥눦눧눨눩눪눫눬눭눮눯눰눱눲눳눴눵눶눷눸눹눺눻눼눽눾눿뉀뉁뉂뉃뉄뉅뉆뉇뉈뉉뉊뉋뉌뉍뉎뉏뉐뉑뉒뉓뉔뉕뉖뉗뉘뉙뉚뉛뉜뉝뉞뉟뉠뉡뉢뉣뉤뉥뉦뉧뉨뉩뉪뉫뉬뉭뉮뉯뉰뉱뉲뉳뉴뉵뉶뉷뉸뉹뉺뉻뉼뉽뉾뉿늀늁늂늃늄'; |
||
4074 | $find = '눻'; |
||
4075 | $result = Multibyte::strrichr($string, $find, true); |
||
4076 | $expected = '눡눢눣눤눥눦눧눨눩눪눫눬눭눮눯눰눱눲눳눴눵눶눷눸눹눺'; |
||
4077 | $this->assertEquals($expected, $result); |
||
4078 | |||
4079 | $string = 'ﹰﹱﹲﹳﹴﹶﹷﹸﹹﹺﹻﹼﹽﹾﹿﺀﺁﺂﺃﺄﺅﺆﺇﺈﺉﺊﺋﺌﺍﺎﺏﺐﺑﺒﺓﺔﺕﺖﺗﺘﺙﺚﺛﺜﺝﺞﺟﺠﺡﺢﺣﺤﺥﺦﺧﺨﺩﺪﺫﺬﺭﺮﺯﺰ'; |
||
4080 | $find = 'ﺞ'; |
||
4081 | $result = Multibyte::strrichr($string, $find); |
||
4082 | $expected = 'ﺞﺟﺠﺡﺢﺣﺤﺥﺦﺧﺨﺩﺪﺫﺬﺭﺮﺯﺰ'; |
||
4083 | $this->assertEquals($expected, $result); |
||
4084 | |||
4085 | $string = 'ﹰﹱﹲﹳﹴﹶﹷﹸﹹﹺﹻﹼﹽﹾﹿﺀﺁﺂﺃﺄﺅﺆﺇﺈﺉﺊﺋﺌﺍﺎﺏﺐﺑﺒﺓﺔﺕﺖﺗﺘﺙﺚﺛﺜﺝﺞﺟﺠﺡﺢﺣﺤﺥﺦﺧﺨﺩﺪﺫﺬﺭﺮﺯﺰ'; |
||
4086 | $find = 'ﺞ'; |
||
4087 | $result = Multibyte::strrichr($string, $find, true); |
||
4088 | $expected = 'ﹰﹱﹲﹳﹴﹶﹷﹸﹹﹺﹻﹼﹽﹾﹿﺀﺁﺂﺃﺄﺅﺆﺇﺈﺉﺊﺋﺌﺍﺎﺏﺐﺑﺒﺓﺔﺕﺖﺗﺘﺙﺚﺛﺜﺝ'; |
||
4089 | $this->assertEquals($expected, $result); |
||
4090 | |||
4091 | $string = 'ﺱﺲﺳﺴﺵﺶﺷﺸﺹﺺﺻﺼﺽﺾﺿﻀﻁﻂﻃﻄﻅﻆﻇﻈﻉﻊﻋﻌﻍﻎﻏﻐﻑﻒﻓﻔﻕﻖﻗﻘﻙﻚﻛﻜﻝﻞﻟﻠﻡﻢﻣﻤﻥﻦﻧﻨﻩﻪﻫﻬﻭﻮﻯﻰﻱﻲﻳﻴﻵﻶﻷﻸﻹﻺﻻﻼ'; |
||
4092 | $find = 'ﻞ'; |
||
4093 | $result = Multibyte::strrichr($string, $find); |
||
4094 | $expected = 'ﻞﻟﻠﻡﻢﻣﻤﻥﻦﻧﻨﻩﻪﻫﻬﻭﻮﻯﻰﻱﻲﻳﻴﻵﻶﻷﻸﻹﻺﻻﻼ'; |
||
4095 | $this->assertEquals($expected, $result); |
||
4096 | |||
4097 | $string = 'ﺱﺲﺳﺴﺵﺶﺷﺸﺹﺺﺻﺼﺽﺾﺿﻀﻁﻂﻃﻄﻅﻆﻇﻈﻉﻊﻋﻌﻍﻎﻏﻐﻑﻒﻓﻔﻕﻖﻗﻘﻙﻚﻛﻜﻝﻞﻟﻠﻡﻢﻣﻤﻥﻦﻧﻨﻩﻪﻫﻬﻭﻮﻯﻰﻱﻲﻳﻴﻵﻶﻷﻸﻹﻺﻻﻼ'; |
||
4098 | $find = 'ﻞ'; |
||
4099 | $result = Multibyte::strrichr($string, $find, true); |
||
4100 | $expected = 'ﺱﺲﺳﺴﺵﺶﺷﺸﺹﺺﺻﺼﺽﺾﺿﻀﻁﻂﻃﻄﻅﻆﻇﻈﻉﻊﻋﻌﻍﻎﻏﻐﻑﻒﻓﻔﻕﻖﻗﻘﻙﻚﻛﻜﻝ'; |
||
4101 | $this->assertEquals($expected, $result); |
||
4102 | |||
4103 | $string = 'abcdefghijklmnopqrstuvwxyz'; |
||
4104 | $find = 'k'; |
||
4105 | $result = Multibyte::strrichr($string, $find); |
||
4106 | $expected = 'klmnopqrstuvwxyz'; |
||
4107 | $this->assertEquals($expected, $result); |
||
4108 | |||
4109 | $string = 'abcdefghijklmnopqrstuvwxyz'; |
||
4110 | $find = 'k'; |
||
4111 | $result = Multibyte::strrichr($string, $find, true); |
||
4112 | $expected = 'abcdefghij'; |
||
4113 | $this->assertEquals($expected, $result); |
||
4114 | |||
4115 | $string = '。「」、・ヲァィゥェォャュョッーアイウエオカキク'; |
||
4116 | $find = 'ア'; |
||
4117 | $result = Multibyte::strrichr($string, $find); |
||
4118 | $expected = 'アイウエオカキク'; |
||
4119 | $this->assertEquals($expected, $result); |
||
4120 | |||
4121 | $string = '。「」、・ヲァィゥェォャュョッーアイウエオカキク'; |
||
4122 | $find = 'ア'; |
||
4123 | $result = Multibyte::strrichr($string, $find, true); |
||
4124 | $expected = '。「」、・ヲァィゥェォャュョッー'; |
||
4125 | $this->assertEquals($expected, $result); |
||
4126 | |||
4127 | $string = 'ケコサシスセソタチツテトナニヌネノハヒフヘホマミムメモヤユヨラリルレロワン゙'; |
||
4128 | $find = 'ハ'; |
||
4129 | $result = Multibyte::strrichr($string, $find); |
||
4130 | $expected = 'ハヒフヘホマミムメモヤユヨラリルレロワン゙'; |
||
4131 | $this->assertEquals($expected, $result); |
||
4132 | |||
4133 | $string = 'ケコサシスセソタチツテトナニヌネノハヒフヘホマミムメモヤユヨラリルレロワン゙'; |
||
4134 | $find = 'ハ'; |
||
4135 | $result = Multibyte::strrichr($string, $find, true); |
||
4136 | $expected = 'ケコサシスセソタチツテトナニヌネノ'; |
||
4137 | $this->assertEquals($expected, $result); |
||
4138 | |||
4139 | $string = 'Ĥēĺļŏ, Ŵőřļď!'; |
||
4140 | $find = 'ő'; |
||
4141 | $result = Multibyte::strrichr($string, $find); |
||
4142 | $expected = 'őřļď!'; |
||
4143 | $this->assertEquals($expected, $result); |
||
4144 | |||
4145 | $string = 'Ĥēĺļŏ, Ŵőřļď!'; |
||
4146 | $find = 'ő'; |
||
4147 | $result = Multibyte::strrichr($string, $find, true); |
||
4148 | $expected = 'Ĥēĺļŏ, Ŵ'; |
||
4149 | $this->assertEquals($expected, $result); |
||
4150 | |||
4151 | $string = 'Hello, World!'; |
||
4152 | $find = 'o'; |
||
4153 | $result = Multibyte::strrichr($string, $find); |
||
4154 | $expected = 'orld!'; |
||
4155 | $this->assertEquals($expected, $result); |
||
4156 | |||
4157 | $string = 'Hello, World!'; |
||
4158 | $find = 'o'; |
||
4159 | $result = Multibyte::strrichr($string, $find, true); |
||
4160 | $expected = 'Hello, W'; |
||
4161 | $this->assertEquals($expected, $result); |
||
4162 | |||
4163 | $string = 'Hello, World!'; |
||
4164 | $find = 'Wo'; |
||
4165 | $result = Multibyte::strrichr($string, $find); |
||
4166 | $expected = 'World!'; |
||
4167 | $this->assertEquals($expected, $result); |
||
4168 | |||
4169 | $string = 'Hello, World!'; |
||
4170 | $find = 'Wo'; |
||
4171 | $result = Multibyte::strrichr($string, $find, true); |
||
4172 | $expected = 'Hello, '; |
||
4173 | $this->assertEquals($expected, $result); |
||
4174 | |||
4175 | $string = 'Hello, World!'; |
||
4176 | $find = 'll'; |
||
4177 | $result = Multibyte::strrichr($string, $find); |
||
4178 | $expected = 'llo, World!'; |
||
4179 | $this->assertEquals($expected, $result); |
||
4180 | |||
4181 | $string = 'Hello, World!'; |
||
4182 | $find = 'll'; |
||
4183 | $result = Multibyte::strrichr($string, $find, true); |
||
4184 | $expected = 'He'; |
||
4185 | $this->assertEquals($expected, $result); |
||
4186 | |||
4187 | $string = 'Hello, World!'; |
||
4188 | $find = 'rld'; |
||
4189 | $result = Multibyte::strrichr($string, $find); |
||
4190 | $expected = 'rld!'; |
||
4191 | $this->assertEquals($expected, $result); |
||
4192 | |||
4193 | $string = 'Hello, World!'; |
||
4194 | $find = 'rld'; |
||
4195 | $result = Multibyte::strrichr($string, $find, true); |
||
4196 | $expected = 'Hello, Wo'; |
||
4197 | $this->assertEquals($expected, $result); |
||
4198 | |||
4199 | $string = 'čini'; |
||
4200 | $find = 'n'; |
||
4201 | $result = Multibyte::strrichr($string, $find); |
||
4202 | $expected = 'ni'; |
||
4203 | $this->assertEquals($expected, $result); |
||
4204 | |||
4205 | $string = 'čini'; |
||
4206 | $find = 'n'; |
||
4207 | $result = Multibyte::strrichr($string, $find, true); |
||
4208 | $expected = 'či'; |
||
4209 | $this->assertEquals($expected, $result); |
||
4210 | |||
4211 | $string = 'moći'; |
||
4212 | $find = 'ć'; |
||
4213 | $result = Multibyte::strrichr($string, $find); |
||
4214 | $expected = 'ći'; |
||
4215 | $this->assertEquals($expected, $result); |
||
4216 | |||
4217 | $string = 'moći'; |
||
4218 | $find = 'ć'; |
||
4219 | $result = Multibyte::strrichr($string, $find, true); |
||
4220 | $expected = 'mo'; |
||
4221 | $this->assertEquals($expected, $result); |
||
4222 | |||
4223 | $string = 'državni'; |
||
4224 | $find = 'ž'; |
||
4225 | $result = Multibyte::strrichr($string, $find); |
||
4226 | $expected = 'žavni'; |
||
4227 | $this->assertEquals($expected, $result); |
||
4228 | |||
4229 | $string = 'državni'; |
||
4230 | $find = 'ž'; |
||
4231 | $result = Multibyte::strrichr($string, $find, true); |
||
4232 | $expected = 'dr'; |
||
4233 | $this->assertEquals($expected, $result); |
||
4234 | |||
4235 | $string = '把百度设为首页'; |
||
4236 | $find = '设'; |
||
4237 | $result = Multibyte::strrichr($string, $find); |
||
4238 | $expected = '设为首页'; |
||
4239 | $this->assertEquals($expected, $result); |
||
4240 | |||
4241 | $string = '把百度设为首页'; |
||
4242 | $find = '设'; |
||
4243 | $result = Multibyte::strrichr($string, $find, true); |
||
4244 | $expected = '把百度'; |
||
4245 | $this->assertEquals($expected, $result); |
||
4246 | |||
4247 | $string = '一二三周永龍'; |
||
4248 | $find = '周'; |
||
4249 | $result = Multibyte::strrichr($string, $find); |
||
4250 | $expected = '周永龍'; |
||
4251 | $this->assertEquals($expected, $result); |
||
4252 | |||
4253 | $string = '一二三周永龍'; |
||
4254 | $find = '周'; |
||
4255 | $result = Multibyte::strrichr($string, $find, true); |
||
4256 | $expected = '一二三'; |
||
4257 | $this->assertEquals($expected, $result); |
||
4258 | |||
4259 | $string = '把百度设为首页'; |
||
4260 | $find = '百设'; |
||
4261 | $result = Multibyte::strrichr($string, $find, true); |
||
4262 | $expected = false; |
||
4263 | $this->assertEquals($expected, $result); |
||
4264 | } |
||
4265 | |||
4266 | /**
|
||
4267 | * testUsingMbStrripos method
|
||
4268 | *
|
||
4269 | * @return void
|
||
4270 | */
|
||
4271 | public function testUsingMbStrripos() { |
||
4272 | $string = 'ABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789'; |
||
4273 | $find = 'F'; |
||
4274 | $result = mb_strripos($string, $find); |
||
4275 | $expected = 5; |
||
4276 | $this->assertEquals($expected, $result); |
||
4277 | |||
4278 | $string = 'ABCDEFGHIJKLMNOPQFRSTUVWXYZ0123456789'; |
||
4279 | $find = 'F'; |
||
4280 | $result = mb_strripos($string, $find, 6); |
||
4281 | $expected = 17; |
||
4282 | $this->assertEquals($expected, $result); |
||
4283 | |||
4284 | $string = 'ÀÁÂÃÄÅÆÇÈÉÊËÌÍÎÏÐÑÒÓÔÕÖØÙÚÛÜÝÞ'; |
||
4285 | $find = 'Å'; |
||
4286 | $result = mb_strripos($string, $find); |
||
4287 | $expected = 5; |
||
4288 | $this->assertEquals($expected, $result); |
||
4289 | |||
4290 | $string = 'ÀÁÂÃÄÅÆÇÈÉÊËÌÍÎÏÐÑÒÓÔÕÖØÅÙÚÛÜÝÞ'; |
||
4291 | $find = 'Å'; |
||
4292 | $result = mb_strripos($string, $find, 6); |
||
4293 | $expected = 24; |
||
4294 | $this->assertEquals($expected, $result); |
||
4295 | |||
4296 | $string = 'ÀÁÂÃÄÅÆÇÈÉÊËÌÍÎÏÐÑÒÓÔÕÖØÅÙÚÛÜÝÞ'; |
||
4297 | $find = 'ÓÔ'; |
||
4298 | $result = mb_strripos($string, $find); |
||
4299 | $expected = 19; |
||
4300 | $this->assertEquals($expected, $result); |
||
4301 | |||
4302 | $string = 'ĀĂĄĆĈĊČĎĐĒĔĖĘĚĜĞĠĢĤĦĨĪĬĮIJĴĶĹĻĽĿŁŃŅŇŊŌŎŐŒŔŖŘŚŜŞŠŢŤŦŨŪŬŮŰŲŴŶŹŻŽ'; |
||
4303 | $find = 'Ċ'; |
||
4304 | $result = mb_strripos($string, $find); |
||
4305 | $expected = 5; |
||
4306 | $this->assertEquals($expected, $result); |
||
4307 | |||
4308 | $string = 'ĀĂĄĆĈĊČĎĐĒĔĖĘĚĜĞĠĢĤĦĨĪĬĮIJĴĶĹĻĽĿŁĊŃŅŇŊŌŎŐŒŔŖŘŚŜŞŠŢŤŦŨŪŬŮŰŲŴŶŹŻŽ'; |
||
4309 | $find = 'Ċ'; |
||
4310 | $result = mb_strripos($string, $find, 6); |
||
4311 | $expected = 32; |
||
4312 | $this->assertEquals($expected, $result); |
||
4313 | |||
4314 | $string = '!"#$%&\'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~'; |
||
4315 | $find = 'F'; |
||
4316 | $result = mb_strripos($string, $find); |
||
4317 | $expected = 69; |
||
4318 | $this->assertEquals($expected, $result); |
||
4319 | |||
4320 | $string = '¡¢£¤¥¦§¨©ª«¬®¯°±²³´µ¶·¸¹º»¼½¾¿ÀÁÂÃÄÅÆÇÈ'; |
||
4321 | $find = 'µ'; |
||
4322 | $result = mb_strripos($string, $find); |
||
4323 | $expected = 20; |
||
4324 | $this->assertEquals($expected, $result); |
||
4325 | |||
4326 | $string = 'ÉÊËÌÍÎÏÐÑÒÓÔÕÖ×ØÙÚÛÜÝÞßàáâãäåæçèéêëìíîïðñòóôõö÷øùúûüýþÿĀāĂ㥹ĆćĈĉĊċČčĎďĐđĒēĔĕĖėĘęĚěĜĝĞğĠġĢģĤĥĦħĨĩĪīĬ'; |
||
4327 | $find = 'é'; |
||
4328 | $result = mb_strripos($string, $find); |
||
4329 | $expected = 32; |
||
4330 | $this->assertEquals($expected, $result); |
||
4331 | |||
4332 | $string = 'ĭĮįİıIJijĴĵĶķĸĹĺĻļĽľĿŀŁłŃńŅņŇňʼnŊŋŌōŎŏŐőŒœŔŕŖŗŘřŚśŜŝŞşŠšŢţŤťŦŧŨũŪūŬŭŮůŰűŲųŴŵŶŷŸŹźŻżŽžſƀƁƂƃƄƅƆƇƈƉƊƋƌƍƎƏƐ'; |
||
4333 | $find = 'Ņ'; |
||
4334 | $result = mb_strripos($string, $find); |
||
4335 | $expected = 25; |
||
4336 | $this->assertEquals($expected, $result); |
||
4337 | |||
4338 | $string = 'ƑƒƓƔƕƖƗƘƙƚƛƜƝƞƟƠơƢƣƤƥƦƧƨƩƪƫƬƭƮƯưƱƲƳƴƵƶƷƸƹƺƻƼƽƾƿǀǁǂǃDŽDždžLJLjljNJNjnjǍǎǏǐǑǒǓǔǕǖǗǘǙǚǛǜǝǞǟǠǡǢǣǤǥǦǧǨǩǪǫǬǭǮǯǰDZDzdzǴ'; |
||
4339 | $find = 'Ƹ'; |
||
4340 | $result = mb_strripos($string, $find); |
||
4341 | $expected = 40; |
||
4342 | $this->assertEquals($expected, $result); |
||
4343 | |||
4344 | $string = 'ƑƒƓƔƕƖƗƘƙƚƛƜƝƞƟƠơƢƣƤƥƦƧƨƩƪƫƬƭƮƯưƱƲƳƴƵƶƷƸƹƺƻƼƽƾƿǀǁǂǃDŽDždžLJLjljNJNjnjǍǎǏǐǑǒǓǔǕǖǗǘǙǚǛǜǝǞǟǠǡǢǣǤǥǦǧǨǩǪǫǬǭǮǯǰDZDzdzǴ'; |
||
4345 | $find = 'ƹ'; |
||
4346 | $result = mb_strripos($string, $find); |
||
4347 | $expected = 40; |
||
4348 | $this->assertEquals($expected, $result); |
||
4349 | |||
4350 | $string = 'əɚɛɜɝɞɟɠɡɢɣɤɥɦɧɨɩɪɫɬɭɮɯɰɱɲɳɴɵɶɷɸɹɺɻɼɽɾɿʀʁʂʃʄʅʆʇʈʉʊʋʌʍʎʏʐʑʒʓʔʕʖʗʘʙʚʛʜʝʞʟʠʡʢʣʤʥʦʧʨʩʪʫʬʭʮʯʰʱʲʳʴʵʶʷʸʹʺʻʼ'; |
||
4351 | $find = 'ʀ'; |
||
4352 | $result = mb_strripos($string, $find); |
||
4353 | $expected = 39; |
||
4354 | $this->assertEquals($expected, $result); |
||
4355 | |||
4356 | $string = 'ЀЁЂЃЄЅІЇЈЉЊЋЌЍЎЏАБВГДЕЖЗИЙКЛ'; |
||
4357 | $find = 'Ї'; |
||
4358 | $result = mb_strripos($string, $find); |
||
4359 | $expected = 7; |
||
4360 | $this->assertEquals($expected, $result); |
||
4361 | |||
4362 | $string = 'МНОПРСТУФХЦЧШЩЪЫЬЭЮЯабвгдежзийклмнопрстуфхцчшщъыь'; |
||
4363 | $find = 'Р'; |
||
4364 | $result = mb_strripos($string, $find); |
||
4365 | $expected = 36; |
||
4366 | $this->assertEquals($expected, $result); |
||
4367 | |||
4368 | $string = 'МНОПРСТУФХЦЧШЩЪЫЬЭЮЯабвгдежзийклмнопрстуфхцчшщъыь'; |
||
4369 | $find = 'р'; |
||
4370 | $result = mb_strripos($string, $find, 5); |
||
4371 | $expected = 36; |
||
4372 | $this->assertEquals($expected, $result); |
||
4373 | |||
4374 | $string = 'فقكلمنهوىيًٌٍَُ'; |
||
4375 | $find = 'ن'; |
||
4376 | $result = mb_strripos($string, $find); |
||
4377 | $expected = 5; |
||
4378 | $this->assertEquals($expected, $result); |
||
4379 | |||
4380 | $string = '✰✱✲✳✴✵✶✷✸✹✺✻✼✽✾✿❀❁❂❃❄❅❆❇❈❉❊❋❌❍❎❏❐❑❒❓❔❕❖❗❘❙❚❛❜❝❞'; |
||
4381 | $find = '✿'; |
||
4382 | $result = mb_strripos($string, $find); |
||
4383 | $expected = 15; |
||
4384 | $this->assertEquals($expected, $result); |
||
4385 | |||
4386 | $string = '⺀⺁⺂⺃⺄⺅⺆⺇⺈⺉⺊⺋⺌⺍⺎⺏⺐⺑⺒⺓⺔⺕⺖⺗⺘⺙⺛⺜⺝⺞⺟⺠⺡⺢⺣⺤⺥⺦⺧⺨⺩⺪⺫⺬⺭⺮⺯⺰⺱⺲⺳⺴⺵⺶⺷⺸⺹⺺⺻⺼⺽⺾⺿⻀⻁⻂⻃⻄⻅⻆⻇⻈⻉⻊⻋⻌⻍⻎⻏⻐⻑⻒⻓⻔⻕⻖⻗⻘⻙⻚⻛⻜⻝⻞⻟⻠'; |
||
4387 | $find = '⺐'; |
||
4388 | $result = mb_strripos($string, $find); |
||
4389 | $expected = 16; |
||
4390 | $this->assertEquals($expected, $result); |
||
4391 | |||
4392 | $string = '⽅⽆⽇⽈⽉⽊⽋⽌⽍⽎⽏⽐⽑⽒⽓⽔⽕⽖⽗⽘⽙⽚⽛⽜⽝⽞⽟⽠⽡⽢⽣⽤⽥⽦⽧⽨⽩⽪⽫⽬⽭⽮⽯⽰⽱⽲⽳⽴⽵⽶⽷⽸⽹⽺⽻⽼⽽⽾⽿'; |
||
4393 | $find = '⽤'; |
||
4394 | $result = mb_strripos($string, $find); |
||
4395 | $expected = 31; |
||
4396 | $this->assertEquals($expected, $result); |
||
4397 | |||
4398 | $string = '눡눢눣눤눥눦눧눨눩눪눫눬눭눮눯눰눱눲눳눴눵눶눷눸눹눺눻눼눽눾눿뉀뉁뉂뉃뉄뉅뉆뉇뉈뉉뉊뉋뉌뉍뉎뉏뉐뉑뉒뉓뉔뉕뉖뉗뉘뉙뉚뉛뉜뉝뉞뉟뉠뉡뉢뉣뉤뉥뉦뉧뉨뉩뉪뉫뉬뉭뉮뉯뉰뉱뉲뉳뉴뉵뉶뉷뉸뉹뉺뉻뉼뉽뉾뉿늀늁늂늃늄'; |
||
4399 | $find = '눻'; |
||
4400 | $result = mb_strripos($string, $find); |
||
4401 | $expected = 26; |
||
4402 | $this->assertEquals($expected, $result); |
||
4403 | |||
4404 | $string = 'ﹰﹱﹲﹳﹴﹶﹷﹸﹹﹺﹻﹼﹽﹾﹿﺀﺁﺂﺃﺄﺅﺆﺇﺈﺉﺊﺋﺌﺍﺎﺏﺐﺑﺒﺓﺔﺕﺖﺗﺘﺙﺚﺛﺜﺝﺞﺟﺠﺡﺢﺣﺤﺥﺦﺧﺨﺩﺪﺫﺬﺭﺮﺯﺰ'; |
||
4405 | $find = 'ﺞ'; |
||
4406 | $result = mb_strripos($string, $find); |
||
4407 | $expected = 46; |
||
4408 | $this->assertEquals($expected, $result); |
||
4409 | |||
4410 | $string = 'ﺱﺲﺳﺴﺵﺶﺷﺸﺹﺺﺻﺼﺽﺾﺿﻀﻁﻂﻃﻄﻅﻆﻇﻈﻉﻊﻋﻌﻍﻎﻏﻐﻑﻒﻓﻔﻕﻖﻗﻘﻙﻚﻛﻜﻝﻞﻟﻠﻡﻢﻣﻤﻥﻦﻧﻨﻩﻪﻫﻬﻭﻮﻯﻰﻱﻲﻳﻴﻵﻶﻷﻸﻹﻺﻻﻼ'; |
||
4411 | $find = 'ﻞ'; |
||
4412 | $result = mb_strripos($string, $find); |
||
4413 | $expected = 45; |
||
4414 | $this->assertEquals($expected, $result); |
||
4415 | |||
4416 | $string = 'abcdefghijklmnopqrstuvwxyz'; |
||
4417 | $find = 'k'; |
||
4418 | $result = mb_strripos($string, $find); |
||
4419 | $expected = 10; |
||
4420 | $this->assertEquals($expected, $result); |
||
4421 | |||
4422 | $string = 'abcdefghijklmnopqrstuvwxyz'; |
||
4423 | $find = 'k'; |
||
4424 | $result = mb_strripos($string, $find); |
||
4425 | $expected = 10; |
||
4426 | $this->assertEquals($expected, $result); |
||
4427 | |||
4428 | $string = 'abcdefghijklmnoppqrstuvwxyz'; |
||
4429 | $find = 'pp'; |
||
4430 | $result = mb_strripos($string, $find); |
||
4431 | $expected = 15; |
||
4432 | $this->assertEquals($expected, $result); |
||
4433 | |||
4434 | $string = '。「」、・ヲァィゥェォャュョッーアイウエオカキク'; |
||
4435 | $find = 'ア'; |
||
4436 | $result = mb_strripos($string, $find); |
||
4437 | $expected = 16; |
||
4438 | $this->assertEquals($expected, $result); |
||
4439 | |||
4440 | $string = 'ケコサシスセソタチツテトナニヌネノハヒフヘホマミムメモヤユヨラリルレロワン゙'; |
||
4441 | $find = 'ハ'; |
||
4442 | $result = mb_strripos($string, $find); |
||
4443 | $expected = 17; |
||
4444 | $this->assertEquals($expected, $result); |
||
4445 | |||
4446 | $string = 'Ĥēĺļŏ, Ŵőřļď!'; |
||
4447 | $find = 'ő'; |
||
4448 | $result = mb_strripos($string, $find); |
||
4449 | $expected = 8; |
||
4450 | $this->assertEquals($expected, $result); |
||
4451 | |||
4452 | $string = 'Ĥēĺļŏ, Ŵőřļď!'; |
||
4453 | $find = 'ő'; |
||
4454 | $result = mb_strripos($string, $find); |
||
4455 | $expected = 8; |
||
4456 | $this->assertEquals($expected, $result); |
||
4457 | |||
4458 | $string = 'Hello, World!'; |
||
4459 | $find = 'o'; |
||
4460 | $result = mb_strripos($string, $find); |
||
4461 | $expected = 8; |
||
4462 | $this->assertEquals($expected, $result); |
||
4463 | |||
4464 | $string = 'Hello, World!'; |
||
4465 | $find = 'o'; |
||
4466 | $result = mb_strripos($string, $find, 5); |
||
4467 | $expected = 8; |
||
4468 | $this->assertEquals($expected, $result); |
||
4469 | |||
4470 | $string = 'čini'; |
||
4471 | $find = 'n'; |
||
4472 | $result = mb_strripos($string, $find); |
||
4473 | $expected = 2; |
||
4474 | $this->assertEquals($expected, $result); |
||
4475 | |||
4476 | $string = 'čini'; |
||
4477 | $find = 'n'; |
||
4478 | $result = mb_strripos($string, $find); |
||
4479 | $expected = 2; |
||
4480 | $this->assertEquals($expected, $result); |
||
4481 | |||
4482 | $string = 'moći'; |
||
4483 | $find = 'ć'; |
||
4484 | $result = mb_strripos($string, $find); |
||
4485 | $expected = 2; |
||
4486 | $this->assertEquals($expected, $result); |
||
4487 | |||
4488 | $string = 'moći'; |
||
4489 | $find = 'ć'; |
||
4490 | $result = mb_strripos($string, $find); |
||
4491 | $expected = 2; |
||
4492 | $this->assertEquals($expected, $result); |
||
4493 | |||
4494 | $string = 'državni'; |
||
4495 | $find = 'ž'; |
||
4496 | $result = mb_strripos($string, $find); |
||
4497 | $expected = 2; |
||
4498 | $this->assertEquals($expected, $result); |
||
4499 | |||
4500 | $string = '把百度设为首页'; |
||
4501 | $find = '设'; |
||
4502 | $result = mb_strripos($string, $find); |
||
4503 | $expected = 3; |
||
4504 | $this->assertEquals($expected, $result); |
||
4505 | |||
4506 | $string = '一二三周永龍'; |
||
4507 | $find = '周'; |
||
4508 | $result = mb_strripos($string, $find); |
||
4509 | $expected = 3; |
||
4510 | $this->assertEquals($expected, $result); |
||
4511 | |||
4512 | $string = 'državni'; |
||
4513 | $find = 'dž'; |
||
4514 | $result = mb_strripos($string, $find); |
||
4515 | $this->assertFalse($result); |
||
4516 | } |
||
4517 | |||
4518 | /**
|
||
4519 | * testMultibyteStrripos method
|
||
4520 | *
|
||
4521 | * @return void
|
||
4522 | */
|
||
4523 | public function testMultibyteStrripos() { |
||
4524 | $string = 'ABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789'; |
||
4525 | $find = 'F'; |
||
4526 | $result = Multibyte::strripos($string, $find); |
||
4527 | $expected = 5; |
||
4528 | $this->assertEquals($expected, $result); |
||
4529 | |||
4530 | $string = 'ABCDEFGHIJKLMNOPQFRSTUVWXYZ0123456789'; |
||
4531 | $find = 'F'; |
||
4532 | $result = Multibyte::strripos($string, $find, 6); |
||
4533 | $expected = 17; |
||
4534 | $this->assertEquals($expected, $result); |
||
4535 | |||
4536 | $string = 'ÀÁÂÃÄÅÆÇÈÉÊËÌÍÎÏÐÑÒÓÔÕÖØÙÚÛÜÝÞ'; |
||
4537 | $find = 'Å'; |
||
4538 | $result = Multibyte::strripos($string, $find); |
||
4539 | $expected = 5; |
||
4540 | $this->assertEquals($expected, $result); |
||
4541 | |||
4542 | $string = 'ÀÁÂÃÄÅÆÇÈÉÊËÌÍÎÏÐÑÒÓÔÕÖØÅÙÚÛÜÝÞ'; |
||
4543 | $find = 'Å'; |
||
4544 | $result = Multibyte::strripos($string, $find, 6); |
||
4545 | $expected = 24; |
||
4546 | $this->assertEquals($expected, $result); |
||
4547 | |||
4548 | $string = 'ÀÁÂÃÄÅÆÇÈÉÊËÌÍÎÏÐÑÒÓÔÕÖØÅÙÚÛÜÝÞ'; |
||
4549 | $find = 'ÓÔ'; |
||
4550 | $result = Multibyte::strripos($string, $find); |
||
4551 | $expected = 19; |
||
4552 | $this->assertEquals($expected, $result); |
||
4553 | |||
4554 | $string = 'ĀĂĄĆĈĊČĎĐĒĔĖĘĚĜĞĠĢĤĦĨĪĬĮIJĴĶĹĻĽĿŁŃŅŇŊŌŎŐŒŔŖŘŚŜŞŠŢŤŦŨŪŬŮŰŲŴŶŹŻŽ'; |
||
4555 | $find = 'Ċ'; |
||
4556 | $result = Multibyte::strripos($string, $find); |
||
4557 | $expected = 5; |
||
4558 | $this->assertEquals($expected, $result); |
||
4559 | |||
4560 | $string = 'ĀĂĄĆĈĊČĎĐĒĔĖĘĚĜĞĠĢĤĦĨĪĬĮIJĴĶĹĻĽĿŁĊŃŅŇŊŌŎŐŒŔŖŘŚŜŞŠŢŤŦŨŪŬŮŰŲŴŶŹŻŽ'; |
||
4561 | $find = 'Ċ'; |
||
4562 | $result = Multibyte::strripos($string, $find, 6); |
||
4563 | $expected = 32; |
||
4564 | $this->assertEquals($expected, $result); |
||
4565 | |||
4566 | $string = '!"#$%&\'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~'; |
||
4567 | $find = 'F'; |
||
4568 | $result = Multibyte::strripos($string, $find); |
||
4569 | $expected = 69; |
||
4570 | $this->assertEquals($expected, $result); |
||
4571 | |||
4572 | $string = '¡¢£¤¥¦§¨©ª«¬®¯°±²³´µ¶·¸¹º»¼½¾¿ÀÁÂÃÄÅÆÇÈ'; |
||
4573 | $find = 'µ'; |
||
4574 | $result = Multibyte::strripos($string, $find); |
||
4575 | $expected = 20; |
||
4576 | $this->assertEquals($expected, $result); |
||
4577 | |||
4578 | $string = 'ÉÊËÌÍÎÏÐÑÒÓÔÕÖ×ØÙÚÛÜÝÞßàáâãäåæçèéêëìíîïðñòóôõö÷øùúûüýþÿĀāĂ㥹ĆćĈĉĊċČčĎďĐđĒēĔĕĖėĘęĚěĜĝĞğĠġĢģĤĥĦħĨĩĪīĬ'; |
||
4579 | $find = 'é'; |
||
4580 | $result = Multibyte::strripos($string, $find); |
||
4581 | $expected = 32; |
||
4582 | $this->assertEquals($expected, $result); |
||
4583 | |||
4584 | $string = 'ĭĮįİıIJijĴĵĶķĸĹĺĻļĽľĿŀŁłŃńŅņŇňʼnŊŋŌōŎŏŐőŒœŔŕŖŗŘřŚśŜŝŞşŠšŢţŤťŦŧŨũŪūŬŭŮůŰűŲųŴŵŶŷŸŹźŻżŽžſƀƁƂƃƄƅƆƇƈƉƊƋƌƍƎƏƐ'; |
||
4585 | $find = 'Ņ'; |
||
4586 | $result = Multibyte::strripos($string, $find); |
||
4587 | $expected = 25; |
||
4588 | $this->assertEquals($expected, $result); |
||
4589 | |||
4590 | $string = 'ƑƒƓƔƕƖƗƘƙƚƛƜƝƞƟƠơƢƣƤƥƦƧƨƩƪƫƬƭƮƯưƱƲƳƴƵƶƷƸƹƺƻƼƽƾƿǀǁǂǃDŽDždžLJLjljNJNjnjǍǎǏǐǑǒǓǔǕǖǗǘǙǚǛǜǝǞǟǠǡǢǣǤǥǦǧǨǩǪǫǬǭǮǯǰDZDzdzǴ'; |
||
4591 | $find = 'Ƹ'; |
||
4592 | $result = Multibyte::strripos($string, $find); |
||
4593 | $expected = 40; |
||
4594 | $this->assertEquals($expected, $result); |
||
4595 | |||
4596 | $string = 'ƑƒƓƔƕƖƗƘƙƚƛƜƝƞƟƠơƢƣƤƥƦƧƨƩƪƫƬƭƮƯưƱƲƳƴƵƶƷƸƹƺƻƼƽƾƿǀǁǂǃDŽDždžLJLjljNJNjnjǍǎǏǐǑǒǓǔǕǖǗǘǙǚǛǜǝǞǟǠǡǢǣǤǥǦǧǨǩǪǫǬǭǮǯǰDZDzdzǴ'; |
||
4597 | $find = 'ƹ'; |
||
4598 | $result = Multibyte::strripos($string, $find); |
||
4599 | $expected = 40; |
||
4600 | $this->assertEquals($expected, $result); |
||
4601 | |||
4602 | $string = 'əɚɛɜɝɞɟɠɡɢɣɤɥɦɧɨɩɪɫɬɭɮɯɰɱɲɳɴɵɶɷɸɹɺɻɼɽɾɿʀʁʂʃʄʅʆʇʈʉʊʋʌʍʎʏʐʑʒʓʔʕʖʗʘʙʚʛʜʝʞʟʠʡʢʣʤʥʦʧʨʩʪʫʬʭʮʯʰʱʲʳʴʵʶʷʸʹʺʻʼ'; |
||
4603 | $find = 'ʀ'; |
||
4604 | $result = Multibyte::strripos($string, $find); |
||
4605 | $expected = 39; |
||
4606 | $this->assertEquals($expected, $result); |
||
4607 | |||
4608 | $string = 'ЀЁЂЃЄЅІЇЈЉЊЋЌЍЎЏАБВГДЕЖЗИЙКЛ'; |
||
4609 | $find = 'Ї'; |
||
4610 | $result = Multibyte::strripos($string, $find); |
||
4611 | $expected = 7; |
||
4612 | $this->assertEquals($expected, $result); |
||
4613 | |||
4614 | $string = 'МНОПРСТУФХЦЧШЩЪЫЬЭЮЯабвгдежзийклмнопрстуфхцчшщъыь'; |
||
4615 | $find = 'Р'; |
||
4616 | $result = Multibyte::strripos($string, $find); |
||
4617 | $expected = 36; |
||
4618 | $this->assertEquals($expected, $result); |
||
4619 | |||
4620 | $string = 'МНОПРСТУФХЦЧШЩЪЫЬЭЮЯабвгдежзийклмнопрстуфхцчшщъыь'; |
||
4621 | $find = 'р'; |
||
4622 | $result = Multibyte::strripos($string, $find, 5); |
||
4623 | $expected = 36; |
||
4624 | $this->assertEquals($expected, $result); |
||
4625 | |||
4626 | $string = 'فقكلمنهوىيًٌٍَُ'; |
||
4627 | $find = 'ن'; |
||
4628 | $result = Multibyte::strripos($string, $find); |
||
4629 | $expected = 5; |
||
4630 | $this->assertEquals($expected, $result); |
||
4631 | |||
4632 | $string = '✰✱✲✳✴✵✶✷✸✹✺✻✼✽✾✿❀❁❂❃❄❅❆❇❈❉❊❋❌❍❎❏❐❑❒❓❔❕❖❗❘❙❚❛❜❝❞'; |
||
4633 | $find = '✿'; |
||
4634 | $result = Multibyte::strripos($string, $find); |
||
4635 | $expected = 15; |
||
4636 | $this->assertEquals($expected, $result); |
||
4637 | |||
4638 | $string = '⺀⺁⺂⺃⺄⺅⺆⺇⺈⺉⺊⺋⺌⺍⺎⺏⺐⺑⺒⺓⺔⺕⺖⺗⺘⺙⺛⺜⺝⺞⺟⺠⺡⺢⺣⺤⺥⺦⺧⺨⺩⺪⺫⺬⺭⺮⺯⺰⺱⺲⺳⺴⺵⺶⺷⺸⺹⺺⺻⺼⺽⺾⺿⻀⻁⻂⻃⻄⻅⻆⻇⻈⻉⻊⻋⻌⻍⻎⻏⻐⻑⻒⻓⻔⻕⻖⻗⻘⻙⻚⻛⻜⻝⻞⻟⻠'; |
||
4639 | $find = '⺐'; |
||
4640 | $result = Multibyte::strripos($string, $find); |
||
4641 | $expected = 16; |
||
4642 | $this->assertEquals($expected, $result); |
||
4643 | |||
4644 | $string = '⽅⽆⽇⽈⽉⽊⽋⽌⽍⽎⽏⽐⽑⽒⽓⽔⽕⽖⽗⽘⽙⽚⽛⽜⽝⽞⽟⽠⽡⽢⽣⽤⽥⽦⽧⽨⽩⽪⽫⽬⽭⽮⽯⽰⽱⽲⽳⽴⽵⽶⽷⽸⽹⽺⽻⽼⽽⽾⽿'; |
||
4645 | $find = '⽤'; |
||
4646 | $result = Multibyte::strripos($string, $find); |
||
4647 | $expected = 31; |
||
4648 | $this->assertEquals($expected, $result); |
||
4649 | |||
4650 | $string = '눡눢눣눤눥눦눧눨눩눪눫눬눭눮눯눰눱눲눳눴눵눶눷눸눹눺눻눼눽눾눿뉀뉁뉂뉃뉄뉅뉆뉇뉈뉉뉊뉋뉌뉍뉎뉏뉐뉑뉒뉓뉔뉕뉖뉗뉘뉙뉚뉛뉜뉝뉞뉟뉠뉡뉢뉣뉤뉥뉦뉧뉨뉩뉪뉫뉬뉭뉮뉯뉰뉱뉲뉳뉴뉵뉶뉷뉸뉹뉺뉻뉼뉽뉾뉿늀늁늂늃늄'; |
||
4651 | $find = '눻'; |
||
4652 | $result = Multibyte::strripos($string, $find); |
||
4653 | $expected = 26; |
||
4654 | $this->assertEquals($expected, $result); |
||
4655 | |||
4656 | $string = 'ﹰﹱﹲﹳﹴﹶﹷﹸﹹﹺﹻﹼﹽﹾﹿﺀﺁﺂﺃﺄﺅﺆﺇﺈﺉﺊﺋﺌﺍﺎﺏﺐﺑﺒﺓﺔﺕﺖﺗﺘﺙﺚﺛﺜﺝﺞﺟﺠﺡﺢﺣﺤﺥﺦﺧﺨﺩﺪﺫﺬﺭﺮﺯﺰ'; |
||
4657 | $find = 'ﺞ'; |
||
4658 | $result = Multibyte::strripos($string, $find); |
||
4659 | $expected = 46; |
||
4660 | $this->assertEquals($expected, $result); |
||
4661 | |||
4662 | $string = 'ﺱﺲﺳﺴﺵﺶﺷﺸﺹﺺﺻﺼﺽﺾﺿﻀﻁﻂﻃﻄﻅﻆﻇﻈﻉﻊﻋﻌﻍﻎﻏﻐﻑﻒﻓﻔﻕﻖﻗﻘﻙﻚﻛﻜﻝﻞﻟﻠﻡﻢﻣﻤﻥﻦﻧﻨﻩﻪﻫﻬﻭﻮﻯﻰﻱﻲﻳﻴﻵﻶﻷﻸﻹﻺﻻﻼ'; |
||
4663 | $find = 'ﻞ'; |
||
4664 | $result = Multibyte::strripos($string, $find); |
||
4665 | $expected = 45; |
||
4666 | $this->assertEquals($expected, $result); |
||
4667 | |||
4668 | $string = 'abcdefghijklmnopqrstuvwxyz'; |
||
4669 | $find = 'k'; |
||
4670 | $result = Multibyte::strripos($string, $find); |
||
4671 | $expected = 10; |
||
4672 | $this->assertEquals($expected, $result); |
||
4673 | |||
4674 | $string = 'abcdefghijklmnopqrstuvwxyz'; |
||
4675 | $find = 'k'; |
||
4676 | $result = Multibyte::strripos($string, $find); |
||
4677 | $expected = 10; |
||
4678 | $this->assertEquals($expected, $result); |
||
4679 | |||
4680 | $string = 'abcdefghijklmnoppqrstuvwxyz'; |
||
4681 | $find = 'pp'; |
||
4682 | $result = Multibyte::strripos($string, $find); |
||
4683 | $expected = 15; |
||
4684 | $this->assertEquals($expected, $result); |
||
4685 | |||
4686 | $string = '。「」、・ヲァィゥェォャュョッーアイウエオカキク'; |
||
4687 | $find = 'ア'; |
||
4688 | $result = Multibyte::strripos($string, $find); |
||
4689 | $expected = 16; |
||
4690 | $this->assertEquals($expected, $result); |
||
4691 | |||
4692 | $string = 'ケコサシスセソタチツテトナニヌネノハヒフヘホマミムメモヤユヨラリルレロワン゙'; |
||
4693 | $find = 'ハ'; |
||
4694 | $result = Multibyte::strripos($string, $find); |
||
4695 | $expected = 17; |
||
4696 | $this->assertEquals($expected, $result); |
||
4697 | |||
4698 | $string = 'Ĥēĺļŏ, Ŵőřļď!'; |
||
4699 | $find = 'ő'; |
||
4700 | $result = Multibyte::strripos($string, $find); |
||
4701 | $expected = 8; |
||
4702 | $this->assertEquals($expected, $result); |
||
4703 | |||
4704 | $string = 'Ĥēĺļŏ, Ŵőřļď!'; |
||
4705 | $find = 'ő'; |
||
4706 | $result = Multibyte::strripos($string, $find); |
||
4707 | $expected = 8; |
||
4708 | $this->assertEquals($expected, $result); |
||
4709 | |||
4710 | $string = 'Hello, World!'; |
||
4711 | $find = 'o'; |
||
4712 | $result = Multibyte::strripos($string, $find); |
||
4713 | $expected = 8; |
||
4714 | $this->assertEquals($expected, $result); |
||
4715 | |||
4716 | $string = 'Hello, World!'; |
||
4717 | $find = 'o'; |
||
4718 | $result = Multibyte::strripos($string, $find, 5); |
||
4719 | $expected = 8; |
||
4720 | $this->assertEquals($expected, $result); |
||
4721 | |||
4722 | $string = 'čini'; |
||
4723 | $find = 'n'; |
||
4724 | $result = Multibyte::strripos($string, $find); |
||
4725 | $expected = 2; |
||
4726 | $this->assertEquals($expected, $result); |
||
4727 | |||
4728 | $string = 'čini'; |
||
4729 | $find = 'n'; |
||
4730 | $result = Multibyte::strripos($string, $find); |
||
4731 | $expected = 2; |
||
4732 | $this->assertEquals($expected, $result); |
||
4733 | |||
4734 | $string = 'moći'; |
||
4735 | $find = 'ć'; |
||
4736 | $result = Multibyte::strripos($string, $find); |
||
4737 | $expected = 2; |
||
4738 | $this->assertEquals($expected, $result); |
||
4739 | |||
4740 | $string = 'moći'; |
||
4741 | $find = 'ć'; |
||
4742 | $result = Multibyte::strripos($string, $find); |
||
4743 | $expected = 2; |
||
4744 | $this->assertEquals($expected, $result); |
||
4745 | |||
4746 | $string = 'državni'; |
||
4747 | $find = 'ž'; |
||
4748 | $result = Multibyte::strripos($string, $find); |
||
4749 | $expected = 2; |
||
4750 | $this->assertEquals($expected, $result); |
||
4751 | |||
4752 | $string = '把百度设为首页'; |
||
4753 | $find = '设'; |
||
4754 | $result = Multibyte::strripos($string, $find); |
||
4755 | $expected = 3; |
||
4756 | $this->assertEquals($expected, $result); |
||
4757 | |||
4758 | $string = '一二三周永龍'; |
||
4759 | $find = '周'; |
||
4760 | $result = Multibyte::strripos($string, $find); |
||
4761 | $expected = 3; |
||
4762 | $this->assertEquals($expected, $result); |
||
4763 | |||
4764 | $string = 'državni'; |
||
4765 | $find = 'dž'; |
||
4766 | $result = Multibyte::strripos($string, $find); |
||
4767 | $expected = 0; |
||
4768 | $this->assertEquals($expected, $result); |
||
4769 | } |
||
4770 | |||
4771 | /**
|
||
4772 | * testUsingMbStrrpos method
|
||
4773 | *
|
||
4774 | * @return void
|
||
4775 | */
|
||
4776 | public function testUsingMbStrrpos() { |
||
4777 | $this->skipIf(extension_loaded('mbstring') && version_compare(PHP_VERSION, '5.2.0', '<'), 'PHP version does not support $offset parameter in mb_strrpos().'); |
||
4778 | |||
4779 | $string = 'ABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789'; |
||
4780 | $find = 'F'; |
||
4781 | $result = mb_strrpos($string, $find); |
||
4782 | $expected = 5; |
||
4783 | $this->assertEquals($expected, $result); |
||
4784 | |||
4785 | $string = 'ABCDEFGHIJKLMNOPQFRSTUVWXYZ0123456789'; |
||
4786 | $find = 'F'; |
||
4787 | $result = mb_strrpos($string, $find, 6); |
||
4788 | $expected = 17; |
||
4789 | $this->assertEquals($expected, $result); |
||
4790 | |||
4791 | $string = 'ÀÁÂÃÄÅÆÇÈÉÊËÌÍÎÏÐÑÒÓÔÕÖØÙÚÛÜÝÞ'; |
||
4792 | $find = 'Å'; |
||
4793 | $result = mb_strrpos($string, $find); |
||
4794 | $expected = 5; |
||
4795 | $this->assertEquals($expected, $result); |
||
4796 | |||
4797 | $string = 'ÀÁÂÃÄÅÆÇÈÉÊËÌÍÎÏÐÑÒÓÔÕÖØÅÙÚÛÜÝÞ'; |
||
4798 | $find = 'ÙÚ'; |
||
4799 | $result = mb_strrpos($string, $find); |
||
4800 | $expected = 25; |
||
4801 | $this->assertEquals($expected, $result); |
||
4802 | |||
4803 | $string = 'ÀÁÂÃÄÅÆÇÈÉÊËÌÍÎÏÐÑÒÓÔÕÖØÅÙÚÛÜÝÞ'; |
||
4804 | $find = 'Å'; |
||
4805 | $result = mb_strrpos($string, $find, 6); |
||
4806 | $expected = 24; |
||
4807 | $this->assertEquals($expected, $result); |
||
4808 | |||
4809 | $string = 'ĀĂĄĆĈĊČĎĐĒĔĖĘĚĜĞĠĢĤĦĨĪĬĮIJĴĶĹĻĽĿŁŃŅŇŊŌŎŐŒŔŖŘŚŜŞŠŢŤŦŨŪŬŮŰŲŴŶŹŻŽ'; |
||
4810 | $find = 'Ċ'; |
||
4811 | $result = mb_strrpos($string, $find); |
||
4812 | $expected = 5; |
||
4813 | $this->assertEquals($expected, $result); |
||
4814 | |||
4815 | $string = 'ĀĂĄĆĈĊČĎĐĒĔĖĘĚĜĞĠĢĤĦĨĪĬĮIJĴĶĹĻĽĿŁĊŃŅŇŊŌŎŐŒŔŖŘŚŜŞŠŢŤŦŨŪŬŮŰŲŴŶŹŻŽ'; |
||
4816 | $find = 'Ċ'; |
||
4817 | $result = mb_strrpos($string, $find, 6); |
||
4818 | $expected = 32; |
||
4819 | $this->assertEquals($expected, $result); |
||
4820 | |||
4821 | $string = '!"#$%&\'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~'; |
||
4822 | $find = 'F'; |
||
4823 | $result = mb_strrpos($string, $find); |
||
4824 | $expected = 37; |
||
4825 | $this->assertEquals($expected, $result); |
||
4826 | |||
4827 | $string = '¡¢£¤¥¦§¨©ª«¬®¯°±²³´µ¶·¸¹º»¼½¾¿ÀÁÂÃÄÅÆÇÈ'; |
||
4828 | $find = 'µ'; |
||
4829 | $result = mb_strrpos($string, $find); |
||
4830 | $expected = 20; |
||
4831 | $this->assertEquals($expected, $result); |
||
4832 | |||
4833 | $string = 'ÉÊËÌÍÎÏÐÑÒÓÔÕÖ×ØÙÚÛÜÝÞßàáâãäåæçèéêëìíîïðñòóôõö÷øùúûüýþÿĀāĂ㥹ĆćĈĉĊċČčĎďĐđĒēĔĕĖėĘęĚěĜĝĞğĠġĢģĤĥĦħĨĩĪīĬ'; |
||
4834 | $find = 'é'; |
||
4835 | $result = mb_strrpos($string, $find); |
||
4836 | $expected = 32; |
||
4837 | $this->assertEquals($expected, $result); |
||
4838 | |||
4839 | $string = 'ĭĮįİıIJijĴĵĶķĸĹĺĻļĽľĿŀŁłŃńŅņŇňʼnŊŋŌōŎŏŐőŒœŔŕŖŗŘřŚśŜŝŞşŠšŢţŤťŦŧŨũŪūŬŭŮůŰűŲųŴŵŶŷŸŹźŻżŽžſƀƁƂƃƄƅƆƇƈƉƊƋƌƍƎƏƐ'; |
||
4840 | $find = 'Ņ'; |
||
4841 | $result = mb_strrpos($string, $find); |
||
4842 | $expected = 24; |
||
4843 | $this->assertEquals($expected, $result); |
||
4844 | |||
4845 | $string = 'ƑƒƓƔƕƖƗƘƙƚƛƜƝƞƟƠơƢƣƤƥƦƧƨƩƪƫƬƭƮƯưƱƲƳƴƵƶƷƸƹƺƻƼƽƾƿǀǁǂǃDŽDždžLJLjljNJNjnjǍǎǏǐǑǒǓǔǕǖǗǘǙǚǛǜǝǞǟǠǡǢǣǤǥǦǧǨǩǪǫǬǭǮǯǰDZDzdzǴ'; |
||
4846 | $find = 'Ƹ'; |
||
4847 | $result = mb_strrpos($string, $find); |
||
4848 | $expected = 39; |
||
4849 | $this->assertEquals($expected, $result); |
||
4850 | |||
4851 | $string = 'ƑƒƓƔƕƖƗƘƙƚƛƜƝƞƟƠơƢƣƤƥƦƧƨƩƪƫƬƭƮƯưƱƲƳƴƵƶƷƸƹƺƻƼƽƾƿǀǁǂǃDŽDždžLJLjljNJNjnjǍǎǏǐǑǒǓǔǕǖǗǘǙǚǛǜǝǞǟǠǡǢǣǤǥǦǧǨǩǪǫǬǭǮǯǰDZDzdzǴ'; |
||
4852 | $find = 'ƹ'; |
||
4853 | $result = mb_strrpos($string, $find); |
||
4854 | $expected = 40; |
||
4855 | $this->assertEquals($expected, $result); |
||
4856 | |||
4857 | $string = 'əɚɛɜɝɞɟɠɡɢɣɤɥɦɧɨɩɪɫɬɭɮɯɰɱɲɳɴɵɶɷɸɹɺɻɼɽɾɿʀʁʂʃʄʅʆʇʈʉʊʋʌʍʎʏʐʑʒʓʔʕʖʗʘʙʚʛʜʝʞʟʠʡʢʣʤʥʦʧʨʩʪʫʬʭʮʯʰʱʲʳʴʵʶʷʸʹʺʻʼ'; |
||
4858 | $find = 'ʀ'; |
||
4859 | $result = mb_strrpos($string, $find); |
||
4860 | $expected = 39; |
||
4861 | $this->assertEquals($expected, $result); |
||
4862 | |||
4863 | $string = 'ЀЁЂЃЄЅІЇЈЉЊЋЌЍЎЏАБВГДЕЖЗИЙКЛ'; |
||
4864 | $find = 'Ї'; |
||
4865 | $result = mb_strrpos($string, $find); |
||
4866 | $expected = 7; |
||
4867 | $this->assertEquals($expected, $result); |
||
4868 | |||
4869 | $string = 'МНОПРСТУФХЦЧШЩЪЫЬЭЮЯабвгдежзийклмнопрстуфхцчшщъыь'; |
||
4870 | $find = 'Р'; |
||
4871 | $result = mb_strrpos($string, $find); |
||
4872 | $expected = 4; |
||
4873 | $this->assertEquals($expected, $result); |
||
4874 | |||
4875 | $string = 'МНОПРСТУФХЦЧШЩЪЫЬЭЮЯабвгдежзийклмнопрстуфхцчшщъыь'; |
||
4876 | $find = 'р'; |
||
4877 | $result = mb_strrpos($string, $find, 5); |
||
4878 | $expected = 36; |
||
4879 | $this->assertEquals($expected, $result); |
||
4880 | |||
4881 | $string = 'فقكلمنهوىيًٌٍَُ'; |
||
4882 | $find = 'ن'; |
||
4883 | $result = mb_strrpos($string, $find); |
||
4884 | $expected = 5; |
||
4885 | $this->assertEquals($expected, $result); |
||
4886 | |||
4887 | $string = '✰✱✲✳✴✵✶✷✸✹✺✻✼✽✾✿❀❁❂❃❄❅❆❇❈❉❊❋❌❍❎❏❐❑❒❓❔❕❖❗❘❙❚❛❜❝❞'; |
||
4888 | $find = '✿'; |
||
4889 | $result = mb_strrpos($string, $find); |
||
4890 | $expected = 15; |
||
4891 | $this->assertEquals($expected, $result); |
||
4892 | |||
4893 | $string = '⺀⺁⺂⺃⺄⺅⺆⺇⺈⺉⺊⺋⺌⺍⺎⺏⺐⺑⺒⺓⺔⺕⺖⺗⺘⺙⺛⺜⺝⺞⺟⺠⺡⺢⺣⺤⺥⺦⺧⺨⺩⺪⺫⺬⺭⺮⺯⺰⺱⺲⺳⺴⺵⺶⺷⺸⺹⺺⺻⺼⺽⺾⺿⻀⻁⻂⻃⻄⻅⻆⻇⻈⻉⻊⻋⻌⻍⻎⻏⻐⻑⻒⻓⻔⻕⻖⻗⻘⻙⻚⻛⻜⻝⻞⻟⻠'; |
||
4894 | $find = '⺐'; |
||
4895 | $result = mb_strrpos($string, $find); |
||
4896 | $expected = 16; |
||
4897 | $this->assertEquals($expected, $result); |
||
4898 | |||
4899 | $string = '⽅⽆⽇⽈⽉⽊⽋⽌⽍⽎⽏⽐⽑⽒⽓⽔⽕⽖⽗⽘⽙⽚⽛⽜⽝⽞⽟⽠⽡⽢⽣⽤⽥⽦⽧⽨⽩⽪⽫⽬⽭⽮⽯⽰⽱⽲⽳⽴⽵⽶⽷⽸⽹⽺⽻⽼⽽⽾⽿'; |
||
4900 | $find = '⽤'; |
||
4901 | $result = mb_strrpos($string, $find); |
||
4902 | $expected = 31; |
||
4903 | $this->assertEquals($expected, $result); |
||
4904 | |||
4905 | $string = '눡눢눣눤눥눦눧눨눩눪눫눬눭눮눯눰눱눲눳눴눵눶눷눸눹눺눻눼눽눾눿뉀뉁뉂뉃뉄뉅뉆뉇뉈뉉뉊뉋뉌뉍뉎뉏뉐뉑뉒뉓뉔뉕뉖뉗뉘뉙뉚뉛뉜뉝뉞뉟뉠뉡뉢뉣뉤뉥뉦뉧뉨뉩뉪뉫뉬뉭뉮뉯뉰뉱뉲뉳뉴뉵뉶뉷뉸뉹뉺뉻뉼뉽뉾뉿늀늁늂늃늄'; |
||
4906 | $find = '눻'; |
||
4907 | $result = mb_strrpos($string, $find); |
||
4908 | $expected = 26; |
||
4909 | $this->assertEquals($expected, $result); |
||
4910 | |||
4911 | $string = 'ﹰﹱﹲﹳﹴﹶﹷﹸﹹﹺﹻﹼﹽﹾﹿﺀﺁﺂﺃﺄﺅﺆﺇﺈﺉﺊﺋﺌﺍﺎﺏﺐﺑﺒﺓﺔﺕﺖﺗﺘﺙﺚﺛﺜﺝﺞﺟﺠﺡﺢﺣﺤﺥﺦﺧﺨﺩﺪﺫﺬﺭﺮﺯﺰ'; |
||
4912 | $find = 'ﺞ'; |
||
4913 | $result = mb_strrpos($string, $find); |
||
4914 | $expected = 46; |
||
4915 | $this->assertEquals($expected, $result); |
||
4916 | |||
4917 | $string = 'ﺱﺲﺳﺴﺵﺶﺷﺸﺹﺺﺻﺼﺽﺾﺿﻀﻁﻂﻃﻄﻅﻆﻇﻈﻉﻊﻋﻌﻍﻎﻏﻐﻑﻒﻓﻔﻕﻖﻗﻘﻙﻚﻛﻜﻝﻞﻟﻠﻡﻢﻣﻤﻥﻦﻧﻨﻩﻪﻫﻬﻭﻮﻯﻰﻱﻲﻳﻴﻵﻶﻷﻸﻹﻺﻻﻼ'; |
||
4918 | $find = 'ﻞ'; |
||
4919 | $result = mb_strrpos($string, $find); |
||
4920 | $expected = 45; |
||
4921 | $this->assertEquals($expected, $result); |
||
4922 | |||
4923 | $string = 'abcdefghijklmnopqrstuvwxyz'; |
||
4924 | $find = 'k'; |
||
4925 | $result = mb_strrpos($string, $find); |
||
4926 | $expected = 10; |
||
4927 | $this->assertEquals($expected, $result); |
||
4928 | |||
4929 | $string = 'abcdefghijklmnopqrstuvwxyz'; |
||
4930 | $find = 'k'; |
||
4931 | $result = mb_strrpos($string, $find); |
||
4932 | $expected = 10; |
||
4933 | $this->assertEquals($expected, $result); |
||
4934 | |||
4935 | $string = 'abcdefghijklmnoppqrstuvwxyz'; |
||
4936 | $find = 'pp'; |
||
4937 | $result = mb_strrpos($string, $find); |
||
4938 | $expected = 15; |
||
4939 | $this->assertEquals($expected, $result); |
||
4940 | |||
4941 | $string = '。「」、・ヲァィゥェォャュョッーアイウエオカキク'; |
||
4942 | $find = 'ア'; |
||
4943 | $result = mb_strrpos($string, $find); |
||
4944 | $expected = 16; |
||
4945 | $this->assertEquals($expected, $result); |
||
4946 | |||
4947 | $string = 'ケコサシスセソタチツテトナニヌネノハヒフヘホマミムメモヤユヨラリルレロワン゙'; |
||
4948 | $find = 'ハ'; |
||
4949 | $result = mb_strrpos($string, $find); |
||
4950 | $expected = 17; |
||
4951 | $this->assertEquals($expected, $result); |
||
4952 | |||
4953 | $string = 'Ĥēĺļŏ, Ŵőřļď!'; |
||
4954 | $find = 'ő'; |
||
4955 | $result = mb_strrpos($string, $find); |
||
4956 | $expected = 8; |
||
4957 | $this->assertEquals($expected, $result); |
||
4958 | |||
4959 | $string = 'Ĥēĺļŏ, Ŵőřļď!'; |
||
4960 | $find = 'ő'; |
||
4961 | $result = mb_strrpos($string, $find); |
||
4962 | $expected = 8; |
||
4963 | $this->assertEquals($expected, $result); |
||
4964 | |||
4965 | $string = 'Hello, World!'; |
||
4966 | $find = 'o'; |
||
4967 | $result = mb_strrpos($string, $find); |
||
4968 | $expected = 8; |
||
4969 | $this->assertEquals($expected, $result); |
||
4970 | |||
4971 | $string = 'Hello, World!'; |
||
4972 | $find = 'o'; |
||
4973 | $result = mb_strrpos($string, $find, 5); |
||
4974 | $expected = 8; |
||
4975 | $this->assertEquals($expected, $result); |
||
4976 | |||
4977 | $string = 'čini'; |
||
4978 | $find = 'n'; |
||
4979 | $result = mb_strrpos($string, $find); |
||
4980 | $expected = 2; |
||
4981 | $this->assertEquals($expected, $result); |
||
4982 | |||
4983 | $string = 'čini'; |
||
4984 | $find = 'n'; |
||
4985 | $result = mb_strrpos($string, $find); |
||
4986 | $expected = 2; |
||
4987 | $this->assertEquals($expected, $result); |
||
4988 | |||
4989 | $string = 'moći'; |
||
4990 | $find = 'ć'; |
||
4991 | $result = mb_strrpos($string, $find); |
||
4992 | $expected = 2; |
||
4993 | $this->assertEquals($expected, $result); |
||
4994 | |||
4995 | $string = 'moći'; |
||
4996 | $find = 'ć'; |
||
4997 | $result = mb_strrpos($string, $find); |
||
4998 | $expected = 2; |
||
4999 | $this->assertEquals($expected, $result); |
||
5000 | |||
5001 | $string = 'državni'; |
||
5002 | $find = 'ž'; |
||
5003 | $result = mb_strrpos($string, $find); |
||
5004 | $expected = 2; |
||
5005 | $this->assertEquals($expected, $result); |
||
5006 | |||
5007 | $string = '把百度设为首页'; |
||
5008 | $find = '设'; |
||
5009 | $result = mb_strrpos($string, $find); |
||
5010 | $expected = 3; |
||
5011 | $this->assertEquals($expected, $result); |
||
5012 | |||
5013 | $string = '一二三周永龍'; |
||
5014 | $find = '周'; |
||
5015 | $result = mb_strrpos($string, $find); |
||
5016 | $expected = 3; |
||
5017 | $this->assertEquals($expected, $result); |
||
5018 | |||
5019 | $string = 'Ĥēĺļŏ, Ŵőřļď!'; |
||
5020 | $find = 'H'; |
||
5021 | $result = mb_strrpos($string, $find); |
||
5022 | $expected = false; |
||
5023 | $this->assertEquals($expected, $result); |
||
5024 | } |
||
5025 | |||
5026 | /**
|
||
5027 | * testMultibyteStrrpos method
|
||
5028 | *
|
||
5029 | * @return void
|
||
5030 | */
|
||
5031 | public function testMultibyteStrrpos() { |
||
5032 | $string = 'ABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789'; |
||
5033 | $find = 'F'; |
||
5034 | $result = Multibyte::strrpos($string, $find); |
||
5035 | $expected = 5; |
||
5036 | $this->assertEquals($expected, $result); |
||
5037 | |||
5038 | $string = 'ABCDEFGHIJKLMNOPQFRSTUVWXYZ0123456789'; |
||
5039 | $find = 'F'; |
||
5040 | $result = Multibyte::strrpos($string, $find, 6); |
||
5041 | $expected = 17; |
||
5042 | $this->assertEquals($expected, $result); |
||
5043 | |||
5044 | $string = 'ÀÁÂÃÄÅÆÇÈÉÊËÌÍÎÏÐÑÒÓÔÕÖØÙÚÛÜÝÞ'; |
||
5045 | $find = 'Å'; |
||
5046 | $result = Multibyte::strrpos($string, $find); |
||
5047 | $expected = 5; |
||
5048 | $this->assertEquals($expected, $result); |
||
5049 | |||
5050 | $string = 'ÀÁÂÃÄÅÆÇÈÉÊËÌÍÎÏÐÑÒÓÔÕÖØÅÙÚÛÜÝÞ'; |
||
5051 | $find = 'Å'; |
||
5052 | $result = Multibyte::strrpos($string, $find, 6); |
||
5053 | $expected = 24; |
||
5054 | $this->assertEquals($expected, $result); |
||
5055 | |||
5056 | $string = 'ÀÁÂÃÄÅÆÇÈÉÊËÌÍÎÏÐÑÒÓÔÕÖØÅÙÚÛÜÝÞ'; |
||
5057 | $find = 'ÙÚ'; |
||
5058 | $result = Multibyte::strrpos($string, $find); |
||
5059 | $expected = 25; |
||
5060 | $this->assertEquals($expected, $result); |
||
5061 | |||
5062 | $string = 'ĀĂĄĆĈĊČĎĐĒĔĖĘĚĜĞĠĢĤĦĨĪĬĮIJĴĶĹĻĽĿŁŃŅŇŊŌŎŐŒŔŖŘŚŜŞŠŢŤŦŨŪŬŮŰŲŴŶŹŻŽ'; |
||
5063 | $find = 'Ċ'; |
||
5064 | $result = Multibyte::strrpos($string, $find); |
||
5065 | $expected = 5; |
||
5066 | $this->assertEquals($expected, $result); |
||
5067 | |||
5068 | $string = 'ĀĂĄĆĈĊČĎĐĒĔĖĘĚĜĞĠĢĤĦĨĪĬĮIJĴĶĹĻĽĿŁĊŃŅŇŊŌŎŐŒŔŖŘŚŜŞŠŢŤŦŨŪŬŮŰŲŴŶŹŻŽ'; |
||
5069 | $find = 'Ċ'; |
||
5070 | $result = Multibyte::strrpos($string, $find, 6); |
||
5071 | $expected = 32; |
||
5072 | $this->assertEquals($expected, $result); |
||
5073 | |||
5074 | $string = '!"#$%&\'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~'; |
||
5075 | $find = 'F'; |
||
5076 | $result = Multibyte::strrpos($string, $find); |
||
5077 | $expected = 37; |
||
5078 | $this->assertEquals($expected, $result); |
||
5079 | |||
5080 | $string = '¡¢£¤¥¦§¨©ª«¬®¯°±²³´µ¶·¸¹º»¼½¾¿ÀÁÂÃÄÅÆÇÈ'; |
||
5081 | $find = 'µ'; |
||
5082 | $result = Multibyte::strrpos($string, $find); |
||
5083 | $expected = 20; |
||
5084 | $this->assertEquals($expected, $result); |
||
5085 | |||
5086 | $string = 'ÉÊËÌÍÎÏÐÑÒÓÔÕÖ×ØÙÚÛÜÝÞßàáâãäåæçèéêëìíîïðñòóôõö÷øùúûüýþÿĀāĂ㥹ĆćĈĉĊċČčĎďĐđĒēĔĕĖėĘęĚěĜĝĞğĠġĢģĤĥĦħĨĩĪīĬ'; |
||
5087 | $find = 'é'; |
||
5088 | $result = Multibyte::strrpos($string, $find); |
||
5089 | $expected = 32; |
||
5090 | $this->assertEquals($expected, $result); |
||
5091 | |||
5092 | $string = 'ĭĮįİıIJijĴĵĶķĸĹĺĻļĽľĿŀŁłŃńŅņŇňʼnŊŋŌōŎŏŐőŒœŔŕŖŗŘřŚśŜŝŞşŠšŢţŤťŦŧŨũŪūŬŭŮůŰűŲųŴŵŶŷŸŹźŻżŽžſƀƁƂƃƄƅƆƇƈƉƊƋƌƍƎƏƐ'; |
||
5093 | $find = 'Ņ'; |
||
5094 | $result = Multibyte::strrpos($string, $find); |
||
5095 | $expected = 24; |
||
5096 | $this->assertEquals($expected, $result); |
||
5097 | |||
5098 | $string = 'ƑƒƓƔƕƖƗƘƙƚƛƜƝƞƟƠơƢƣƤƥƦƧƨƩƪƫƬƭƮƯưƱƲƳƴƵƶƷƸƹƺƻƼƽƾƿǀǁǂǃDŽDždžLJLjljNJNjnjǍǎǏǐǑǒǓǔǕǖǗǘǙǚǛǜǝǞǟǠǡǢǣǤǥǦǧǨǩǪǫǬǭǮǯǰDZDzdzǴ'; |
||
5099 | $find = 'Ƹ'; |
||
5100 | $result = Multibyte::strrpos($string, $find); |
||
5101 | $expected = 39; |
||
5102 | $this->assertEquals($expected, $result); |
||
5103 | |||
5104 | $string = 'ƑƒƓƔƕƖƗƘƙƚƛƜƝƞƟƠơƢƣƤƥƦƧƨƩƪƫƬƭƮƯưƱƲƳƴƵƶƷƸƹƺƻƼƽƾƿǀǁǂǃDŽDždžLJLjljNJNjnjǍǎǏǐǑǒǓǔǕǖǗǘǙǚǛǜǝǞǟǠǡǢǣǤǥǦǧǨǩǪǫǬǭǮǯǰDZDzdzǴ'; |
||
5105 | $find = 'ƹ'; |
||
5106 | $result = Multibyte::strrpos($string, $find); |
||
5107 | $expected = 40; |
||
5108 | $this->assertEquals($expected, $result); |
||
5109 | |||
5110 | $string = 'əɚɛɜɝɞɟɠɡɢɣɤɥɦɧɨɩɪɫɬɭɮɯɰɱɲɳɴɵɶɷɸɹɺɻɼɽɾɿʀʁʂʃʄʅʆʇʈʉʊʋʌʍʎʏʐʑʒʓʔʕʖʗʘʙʚʛʜʝʞʟʠʡʢʣʤʥʦʧʨʩʪʫʬʭʮʯʰʱʲʳʴʵʶʷʸʹʺʻʼ'; |
||
5111 | $find = 'ʀ'; |
||
5112 | $result = Multibyte::strrpos($string, $find); |
||
5113 | $expected = 39; |
||
5114 | $this->assertEquals($expected, $result); |
||
5115 | |||
5116 | $string = 'ЀЁЂЃЄЅІЇЈЉЊЋЌЍЎЏАБВГДЕЖЗИЙКЛ'; |
||
5117 | $find = 'Ї'; |
||
5118 | $result = Multibyte::strrpos($string, $find); |
||
5119 | $expected = 7; |
||
5120 | $this->assertEquals($expected, $result); |
||
5121 | |||
5122 | $string = 'МНОПРСТУФХЦЧШЩЪЫЬЭЮЯабвгдежзийклмнопрстуфхцчшщъыь'; |
||
5123 | $find = 'Р'; |
||
5124 | $result = Multibyte::strrpos($string, $find); |
||
5125 | $expected = 4; |
||
5126 | $this->assertEquals($expected, $result); |
||
5127 | |||
5128 | $string = 'МНОПРСТУФХЦЧШЩЪЫЬЭЮЯабвгдежзийклмнопрстуфхцчшщъыь'; |
||
5129 | $find = 'р'; |
||
5130 | $result = Multibyte::strrpos($string, $find, 5); |
||
5131 | $expected = 36; |
||
5132 | $this->assertEquals($expected, $result); |
||
5133 | |||
5134 | $string = 'فقكلمنهوىيًٌٍَُ'; |
||
5135 | $find = 'ن'; |
||
5136 | $result = Multibyte::strrpos($string, $find); |
||
5137 | $expected = 5; |
||
5138 | $this->assertEquals($expected, $result); |
||
5139 | |||
5140 | $string = '✰✱✲✳✴✵✶✷✸✹✺✻✼✽✾✿❀❁❂❃❄❅❆❇❈❉❊❋❌❍❎❏❐❑❒❓❔❕❖❗❘❙❚❛❜❝❞'; |
||
5141 | $find = '✿'; |
||
5142 | $result = Multibyte::strrpos($string, $find); |
||
5143 | $expected = 15; |
||
5144 | $this->assertEquals($expected, $result); |
||
5145 | |||
5146 | $string = '⺀⺁⺂⺃⺄⺅⺆⺇⺈⺉⺊⺋⺌⺍⺎⺏⺐⺑⺒⺓⺔⺕⺖⺗⺘⺙⺛⺜⺝⺞⺟⺠⺡⺢⺣⺤⺥⺦⺧⺨⺩⺪⺫⺬⺭⺮⺯⺰⺱⺲⺳⺴⺵⺶⺷⺸⺹⺺⺻⺼⺽⺾⺿⻀⻁⻂⻃⻄⻅⻆⻇⻈⻉⻊⻋⻌⻍⻎⻏⻐⻑⻒⻓⻔⻕⻖⻗⻘⻙⻚⻛⻜⻝⻞⻟⻠'; |
||
5147 | $find = '⺐'; |
||
5148 | $result = Multibyte::strrpos($string, $find); |
||
5149 | $expected = 16; |
||
5150 | $this->assertEquals($expected, $result); |
||
5151 | |||
5152 | $string = '⽅⽆⽇⽈⽉⽊⽋⽌⽍⽎⽏⽐⽑⽒⽓⽔⽕⽖⽗⽘⽙⽚⽛⽜⽝⽞⽟⽠⽡⽢⽣⽤⽥⽦⽧⽨⽩⽪⽫⽬⽭⽮⽯⽰⽱⽲⽳⽴⽵⽶⽷⽸⽹⽺⽻⽼⽽⽾⽿'; |
||
5153 | $find = '⽤'; |
||
5154 | $result = Multibyte::strrpos($string, $find); |
||
5155 | $expected = 31; |
||
5156 | $this->assertEquals($expected, $result); |
||
5157 | |||
5158 | $string = '눡눢눣눤눥눦눧눨눩눪눫눬눭눮눯눰눱눲눳눴눵눶눷눸눹눺눻눼눽눾눿뉀뉁뉂뉃뉄뉅뉆뉇뉈뉉뉊뉋뉌뉍뉎뉏뉐뉑뉒뉓뉔뉕뉖뉗뉘뉙뉚뉛뉜뉝뉞뉟뉠뉡뉢뉣뉤뉥뉦뉧뉨뉩뉪뉫뉬뉭뉮뉯뉰뉱뉲뉳뉴뉵뉶뉷뉸뉹뉺뉻뉼뉽뉾뉿늀늁늂늃늄'; |
||
5159 | $find = '눻'; |
||
5160 | $result = Multibyte::strrpos($string, $find); |
||
5161 | $expected = 26; |
||
5162 | $this->assertEquals($expected, $result); |
||
5163 | |||
5164 | $string = 'ﹰﹱﹲﹳﹴﹶﹷﹸﹹﹺﹻﹼﹽﹾﹿﺀﺁﺂﺃﺄﺅﺆﺇﺈﺉﺊﺋﺌﺍﺎﺏﺐﺑﺒﺓﺔﺕﺖﺗﺘﺙﺚﺛﺜﺝﺞﺟﺠﺡﺢﺣﺤﺥﺦﺧﺨﺩﺪﺫﺬﺭﺮﺯﺰ'; |
||
5165 | $find = 'ﺞ'; |
||
5166 | $result = Multibyte::strrpos($string, $find); |
||
5167 | $expected = 46; |
||
5168 | $this->assertEquals($expected, $result); |
||
5169 | |||
5170 | $string = 'ﺱﺲﺳﺴﺵﺶﺷﺸﺹﺺﺻﺼﺽﺾﺿﻀﻁﻂﻃﻄﻅﻆﻇﻈﻉﻊﻋﻌﻍﻎﻏﻐﻑﻒﻓﻔﻕﻖﻗﻘﻙﻚﻛﻜﻝﻞﻟﻠﻡﻢﻣﻤﻥﻦﻧﻨﻩﻪﻫﻬﻭﻮﻯﻰﻱﻲﻳﻴﻵﻶﻷﻸﻹﻺﻻﻼ'; |
||
5171 | $find = 'ﻞ'; |
||
5172 | $result = Multibyte::strrpos($string, $find); |
||
5173 | $expected = 45; |
||
5174 | $this->assertEquals($expected, $result); |
||
5175 | |||
5176 | $string = 'abcdefghijklmnopqrstuvwxyz'; |
||
5177 | $find = 'k'; |
||
5178 | $result = Multibyte::strrpos($string, $find); |
||
5179 | $expected = 10; |
||
5180 | $this->assertEquals($expected, $result); |
||
5181 | |||
5182 | $string = 'abcdefghijklmnopqrstuvwxyz'; |
||
5183 | $find = 'k'; |
||
5184 | $result = Multibyte::strrpos($string, $find); |
||
5185 | $expected = 10; |
||
5186 | $this->assertEquals($expected, $result); |
||
5187 | |||
5188 | $string = 'abcdefghijklmnoppqrstuvwxyz'; |
||
5189 | $find = 'pp'; |
||
5190 | $result = Multibyte::strrpos($string, $find); |
||
5191 | $expected = 15; |
||
5192 | $this->assertEquals($expected, $result); |
||
5193 | |||
5194 | $string = '。「」、・ヲァィゥェォャュョッーアイウエオカキク'; |
||
5195 | $find = 'ア'; |
||
5196 | $result = Multibyte::strrpos($string, $find); |
||
5197 | $expected = 16; |
||
5198 | $this->assertEquals($expected, $result); |
||
5199 | |||
5200 | $string = 'ケコサシスセソタチツテトナニヌネノハヒフヘホマミムメモヤユヨラリルレロワン゙'; |
||
5201 | $find = 'ハ'; |
||
5202 | $result = Multibyte::strrpos($string, $find); |
||
5203 | $expected = 17; |
||
5204 | $this->assertEquals($expected, $result); |
||
5205 | |||
5206 | $string = 'Ĥēĺļŏ, Ŵőřļď!'; |
||
5207 | $find = 'ő'; |
||
5208 | $result = Multibyte::strrpos($string, $find); |
||
5209 | $expected = 8; |
||
5210 | $this->assertEquals($expected, $result); |
||
5211 | |||
5212 | $string = 'Ĥēĺļŏ, Ŵőřļď!'; |
||
5213 | $find = 'ő'; |
||
5214 | $result = Multibyte::strrpos($string, $find); |
||
5215 | $expected = 8; |
||
5216 | $this->assertEquals($expected, $result); |
||
5217 | |||
5218 | $string = 'Hello, World!'; |
||
5219 | $find = 'o'; |
||
5220 | $result = Multibyte::strrpos($string, $find); |
||
5221 | $expected = 8; |
||
5222 | $this->assertEquals($expected, $result); |
||
5223 | |||
5224 | $string = 'Hello, World!'; |
||
5225 | $find = 'o'; |
||
5226 | $result = Multibyte::strrpos($string, $find, 5); |
||
5227 | $expected = 8; |
||
5228 | $this->assertEquals($expected, $result); |
||
5229 | |||
5230 | $string = 'čini'; |
||
5231 | $find = 'n'; |
||
5232 | $result = Multibyte::strrpos($string, $find); |
||
5233 | $expected = 2; |
||
5234 | $this->assertEquals($expected, $result); |
||
5235 | |||
5236 | $string = 'čini'; |
||
5237 | $find = 'n'; |
||
5238 | $result = Multibyte::strrpos($string, $find); |
||
5239 | $expected = 2; |
||
5240 | $this->assertEquals($expected, $result); |
||
5241 | |||
5242 | $string = 'moći'; |
||
5243 | $find = 'ć'; |
||
5244 | $result = Multibyte::strrpos($string, $find); |
||
5245 | $expected = 2; |
||
5246 | $this->assertEquals($expected, $result); |
||
5247 | |||
5248 | $string = 'moći'; |
||
5249 | $find = 'ć'; |
||
5250 | $result = Multibyte::strrpos($string, $find); |
||
5251 | $expected = 2; |
||
5252 | $this->assertEquals($expected, $result); |
||
5253 | |||
5254 | $string = 'državni'; |
||
5255 | $find = 'ž'; |
||
5256 | $result = Multibyte::strrpos($string, $find); |
||
5257 | $expected = 2; |
||
5258 | $this->assertEquals($expected, $result); |
||
5259 | |||
5260 | $string = '把百度设为首页'; |
||
5261 | $find = '设'; |
||
5262 | $result = Multibyte::strrpos($string, $find); |
||
5263 | $expected = 3; |
||
5264 | $this->assertEquals($expected, $result); |
||
5265 | |||
5266 | $string = '一二三周永龍'; |
||
5267 | $find = '周'; |
||
5268 | $result = Multibyte::strrpos($string, $find); |
||
5269 | $expected = 3; |
||
5270 | $this->assertEquals($expected, $result); |
||
5271 | |||
5272 | $string = 'Ĥēĺļŏ, Ŵőřļď!'; |
||
5273 | $find = 'H'; |
||
5274 | $result = Multibyte::strrpos($string, $find); |
||
5275 | $expected = false; |
||
5276 | $this->assertEquals($expected, $result); |
||
5277 | } |
||
5278 | |||
5279 | /**
|
||
5280 | * testUsingMbStrstr method
|
||
5281 | *
|
||
5282 | * @return void
|
||
5283 | */
|
||
5284 | public function testUsingMbStrstr() { |
||
5285 | $string = 'ABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789'; |
||
5286 | $find = 'F'; |
||
5287 | $result = mb_strstr($string, $find); |
||
5288 | $expected = 'FGHIJKLMNOPQRSTUVWXYZ0123456789'; |
||
5289 | $this->assertEquals($expected, $result); |
||
5290 | |||
5291 | $string = 'ABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789'; |
||
5292 | $find = 'F'; |
||
5293 | $result = mb_strstr($string, $find, true); |
||
5294 | $expected = 'ABCDE'; |
||
5295 | $this->assertEquals($expected, $result); |
||
5296 | |||
5297 | $string = 'ÀÁÂÃÄÅÆÇÈÉÊËÌÍÎÏÐÑÒÓÔÕÖØÙÚÛÜÝÞ'; |
||
5298 | $find = 'Å'; |
||
5299 | $result = mb_strstr($string, $find); |
||
5300 | $expected = 'ÅÆÇÈÉÊËÌÍÎÏÐÑÒÓÔÕÖØÙÚÛÜÝÞ'; |
||
5301 | $this->assertEquals($expected, $result); |
||
5302 | |||
5303 | $string = 'ÀÁÂÃÄÅÆÇÈÉÊËÌÍÎÏÐÑÒÓÔÕÖØÙÚÛÜÝÞ'; |
||
5304 | $find = 'Å'; |
||
5305 | $result = mb_strstr($string, $find, true); |
||
5306 | $expected = 'ÀÁÂÃÄ'; |
||
5307 | $this->assertEquals($expected, $result); |
||
5308 | |||
5309 | $string = 'ĀĂĄĆĈĊČĎĐĒĔĖĘĚĜĞĠĢĤĦĨĪĬĮIJĴĶĹĻĽĿŁŃŅŇŊŌŎŐŒŔŖŘŚŜŞŠŢŤŦŨŪŬŮŰŲŴŶŹŻŽ'; |
||
5310 | $find = 'Ċ'; |
||
5311 | $result = mb_strstr($string, $find); |
||
5312 | $expected = 'ĊČĎĐĒĔĖĘĚĜĞĠĢĤĦĨĪĬĮIJĴĶĹĻĽĿŁŃŅŇŊŌŎŐŒŔŖŘŚŜŞŠŢŤŦŨŪŬŮŰŲŴŶŹŻŽ'; |
||
5313 | $this->assertEquals($expected, $result); |
||
5314 | |||
5315 | $string = 'ĀĂĄĆĈĊČĎĐĒĔĖĘĚĜĞĠĢĤĦĨĪĬĮIJĴĶĹĻĽĿŁŃŅŇŊŌŎŐŒŔŖŘŚŜŞŠŢŤŦŨŪŬŮŰŲŴŶŹŻŽ'; |
||
5316 | $find = 'Ċ'; |
||
5317 | $result = mb_strstr($string, $find, true); |
||
5318 | $expected = 'ĀĂĄĆĈ'; |
||
5319 | $this->assertEquals($expected, $result); |
||
5320 | |||
5321 | $string = '!"#$%&\'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~'; |
||
5322 | $find = 'F'; |
||
5323 | $result = mb_strstr($string, $find); |
||
5324 | $expected = 'FGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~'; |
||
5325 | $this->assertEquals($expected, $result); |
||
5326 | |||
5327 | $string = '!"#$%&\'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~'; |
||
5328 | $find = 'F'; |
||
5329 | $result = mb_strstr($string, $find, true); |
||
5330 | $expected = '!"#$%&\'()*+,-./0123456789:;<=>?@ABCDE'; |
||
5331 | $this->assertEquals($expected, $result); |
||
5332 | |||
5333 | $string = '¡¢£¤¥¦§¨©ª«¬®¯°±²³´µ¶·¸¹º»¼½¾¿ÀÁÂÃÄÅÆÇÈ'; |
||
5334 | $find = 'µ'; |
||
5335 | $result = mb_strstr($string, $find); |
||
5336 | $expected = 'µ¶·¸¹º»¼½¾¿ÀÁÂÃÄÅÆÇÈ'; |
||
5337 | $this->assertEquals($expected, $result); |
||
5338 | |||
5339 | $string = '¡¢£¤¥¦§¨©ª«¬®¯°±²³´µ¶·¸¹º»¼½¾¿ÀÁÂÃÄÅÆÇÈ'; |
||
5340 | $find = 'µ'; |
||
5341 | $result = mb_strstr($string, $find, true); |
||
5342 | $expected = '¡¢£¤¥¦§¨©ª«¬®¯°±²³´'; |
||
5343 | $this->assertEquals($expected, $result); |
||
5344 | |||
5345 | $string = 'ÉÊËÌÍÎÏÐÑÒÓÔÕÖ×ØÙÚÛÜÝÞßàáâãäåæçèéêëìíîïðñòóôõö÷øùúûüýþÿĀāĂ㥹ĆćĈĉĊċČčĎďĐđĒēĔĕĖėĘęĚěĜĝĞğĠġĢģĤĥĦħĨĩĪīĬ'; |
||
5346 | $find = 'Þ'; |
||
5347 | $result = mb_strstr($string, $find); |
||
5348 | $expected = 'Þßàáâãäåæçèéêëìíîïðñòóôõö÷øùúûüýþÿĀāĂ㥹ĆćĈĉĊċČčĎďĐđĒēĔĕĖėĘęĚěĜĝĞğĠġĢģĤĥĦħĨĩĪīĬ'; |
||
5349 | $this->assertEquals($expected, $result); |
||
5350 | |||
5351 | $string = 'ÉÊËÌÍÎÏÐÑÒÓÔÕÖ×ØÙÚÛÜÝÞßàáâãäåæçèéêëìíîïðñòóôõö÷øùúûüýþÿĀāĂ㥹ĆćĈĉĊċČčĎďĐđĒēĔĕĖėĘęĚěĜĝĞğĠġĢģĤĥĦħĨĩĪīĬ'; |
||
5352 | $find = 'Þ'; |
||
5353 | $result = mb_strstr($string, $find, true); |
||
5354 | $expected = 'ÉÊËÌÍÎÏÐÑÒÓÔÕÖ×ØÙÚÛÜÝ'; |
||
5355 | $this->assertEquals($expected, $result); |
||
5356 | |||
5357 | $string = 'ĭĮįİıIJijĴĵĶķĸĹĺĻļĽľĿŀŁłŃńŅņŇňʼnŊŋŌōŎŏŐőŒœŔŕŖŗŘřŚśŜŝŞşŠšŢţŤťŦŧŨũŪūŬŭŮůŰűŲųŴŵŶŷŸŹźŻżŽžſƀƁƂƃƄƅƆƇƈƉƊƋƌƍƎƏƐ'; |
||
5358 | $find = 'Ņ'; |
||
5359 | $result = mb_strstr($string, $find); |
||
5360 | $expected = 'ŅņŇňʼnŊŋŌōŎŏŐőŒœŔŕŖŗŘřŚśŜŝŞşŠšŢţŤťŦŧŨũŪūŬŭŮůŰűŲųŴŵŶŷŸŹźŻżŽžſƀƁƂƃƄƅƆƇƈƉƊƋƌƍƎƏƐ'; |
||
5361 | $this->assertEquals($expected, $result); |
||
5362 | |||
5363 | $string = 'ĭĮįİıIJijĴĵĶķĸĹĺĻļĽľĿŀŁłŃńŅņŇňʼnŊŋŌōŎŏŐőŒœŔŕŖŗŘřŚśŜŝŞşŠšŢţŤťŦŧŨũŪūŬŭŮůŰűŲųŴŵŶŷŸŹźŻżŽžſƀƁƂƃƄƅƆƇƈƉƊƋƌƍƎƏƐ'; |
||
5364 | $find = 'Ņ'; |
||
5365 | $result = mb_strstr($string, $find, true); |
||
5366 | $expected = 'ĭĮįİıIJijĴĵĶķĸĹĺĻļĽľĿŀŁłŃń'; |
||
5367 | $this->assertEquals($expected, $result); |
||
5368 | |||
5369 | $string = 'ƑƒƓƔƕƖƗƘƙƚƛƜƝƞƟƠơƢƣƤƥƦƧƨƩƪƫƬƭƮƯưƱƲƳƴƵƶƷƸƹƺƻƼƽƾƿǀǁǂǃDŽDždžLJLjljNJNjnjǍǎǏǐǑǒǓǔǕǖǗǘǙǚǛǜǝǞǟǠǡǢǣǤǥǦǧǨǩǪǫǬǭǮǯǰDZDzdzǴ'; |
||
5370 | $find = 'Ƹ'; |
||
5371 | $result = mb_strstr($string, $find); |
||
5372 | $expected = 'ƸƹƺƻƼƽƾƿǀǁǂǃDŽDždžLJLjljNJNjnjǍǎǏǐǑǒǓǔǕǖǗǘǙǚǛǜǝǞǟǠǡǢǣǤǥǦǧǨǩǪǫǬǭǮǯǰDZDzdzǴ'; |
||
5373 | $this->assertEquals($expected, $result); |
||
5374 | |||
5375 | $find = 'Ƹ'; |
||
5376 | $result = mb_strstr($string, $find, true); |
||
5377 | $expected = 'ƑƒƓƔƕƖƗƘƙƚƛƜƝƞƟƠơƢƣƤƥƦƧƨƩƪƫƬƭƮƯưƱƲƳƴƵƶƷ'; |
||
5378 | $this->assertEquals($expected, $result); |
||
5379 | |||
5380 | $string = 'əɚɛɜɝɞɟɠɡɢɣɤɥɦɧɨɩɪɫɬɭɮɯɰɱɲɳɴɵɶɷɸɹɺɻɼɽɾɿʀʁʂʃʄʅʆʇʈʉʊʋʌʍʎʏʐʑʒʓʔʕʖʗʘʙʚʛʜʝʞʟʠʡʢʣʤʥʦʧʨʩʪʫʬʭʮʯʰʱʲʳʴʵʶʷʸʹʺʻʼ'; |
||
5381 | $find = 'ʀ'; |
||
5382 | $result = mb_strstr($string, $find); |
||
5383 | $expected = 'ʀʁʂʃʄʅʆʇʈʉʊʋʌʍʎʏʐʑʒʓʔʕʖʗʘʙʚʛʜʝʞʟʠʡʢʣʤʥʦʧʨʩʪʫʬʭʮʯʰʱʲʳʴʵʶʷʸʹʺʻʼ'; |
||
5384 | $this->assertEquals($expected, $result); |
||
5385 | |||
5386 | $string = 'əɚɛɜɝɞɟɠɡɢɣɤɥɦɧɨɩɪɫɬɭɮɯɰɱɲɳɴɵɶɷɸɹɺɻɼɽɾɿʀʁʂʃʄʅʆʇʈʉʊʋʌʍʎʏʐʑʒʓʔʕʖʗʘʙʚʛʜʝʞʟʠʡʢʣʤʥʦʧʨʩʪʫʬʭʮʯʰʱʲʳʴʵʶʷʸʹʺʻʼ'; |
||
5387 | $find = 'ʀ'; |
||
5388 | $result = mb_strstr($string, $find, true); |
||
5389 | $expected = 'əɚɛɜɝɞɟɠɡɢɣɤɥɦɧɨɩɪɫɬɭɮɯɰɱɲɳɴɵɶɷɸɹɺɻɼɽɾɿ'; |
||
5390 | $this->assertEquals($expected, $result); |
||
5391 | |||
5392 | $string = 'ЀЁЂЃЄЅІЇЈЉЊЋЌЍЎЏАБВГДЕЖЗИЙКЛ'; |
||
5393 | $find = 'Ї'; |
||
5394 | $result = mb_strstr($string, $find); |
||
5395 | $expected = 'ЇЈЉЊЋЌЍЎЏАБВГДЕЖЗИЙКЛ'; |
||
5396 | $this->assertEquals($expected, $result); |
||
5397 | |||
5398 | $string = 'ЀЁЂЃЄЅІЇЈЉЊЋЌЍЎЏАБВГДЕЖЗИЙКЛ'; |
||
5399 | $find = 'Ї'; |
||
5400 | $result = mb_strstr($string, $find, true); |
||
5401 | $expected = 'ЀЁЂЃЄЅІ'; |
||
5402 | $this->assertEquals($expected, $result); |
||
5403 | |||
5404 | $string = 'МНОПРСТУФХЦЧШЩЪЫЬЭЮЯабвгдежзийклмнопрстуфхцчшщъыь'; |
||
5405 | $find = 'Р'; |
||
5406 | $result = mb_strstr($string, $find); |
||
5407 | $expected = 'РСТУФХЦЧШЩЪЫЬЭЮЯабвгдежзийклмнопрстуфхцчшщъыь'; |
||
5408 | $this->assertEquals($expected, $result); |
||
5409 | |||
5410 | $string = 'МНОПРСТУФХЦЧШЩЪЫЬЭЮЯабвгдежзийклмнопрстуфхцчшщъыь'; |
||
5411 | $find = 'Р'; |
||
5412 | $result = mb_strstr($string, $find, true); |
||
5413 | $expected = 'МНОП'; |
||
5414 | $this->assertEquals($expected, $result); |
||
5415 | |||
5416 | $string = 'فقكلمنهوىيًٌٍَُ'; |
||
5417 | $find = 'ن'; |
||
5418 | $result = mb_strstr($string, $find); |
||
5419 | $expected = 'نهوىيًٌٍَُ'; |
||
5420 | $this->assertEquals($expected, $result); |
||
5421 | |||
5422 | $string = 'فقكلمنهوىيًٌٍَُ'; |
||
5423 | $find = 'ن'; |
||
5424 | $result = mb_strstr($string, $find, true); |
||
5425 | $expected = 'فقكلم'; |
||
5426 | $this->assertEquals($expected, $result); |
||
5427 | |||
5428 | $string = '✰✱✲✳✴✵✶✷✸✹✺✻✼✽✾✿❀❁❂❃❄❅❆❇❈❉❊❋❌❍❎❏❐❑❒❓❔❕❖❗❘❙❚❛❜❝❞'; |
||
5429 | $find = '✿'; |
||
5430 | $result = mb_strstr($string, $find); |
||
5431 | $expected = '✿❀❁❂❃❄❅❆❇❈❉❊❋❌❍❎❏❐❑❒❓❔❕❖❗❘❙❚❛❜❝❞'; |
||
5432 | $this->assertEquals($expected, $result); |
||
5433 | |||
5434 | $string = '✰✱✲✳✴✵✶✷✸✹✺✻✼✽✾✿❀❁❂❃❄❅❆❇❈❉❊❋❌❍❎❏❐❑❒❓❔❕❖❗❘❙❚❛❜❝❞'; |
||
5435 | $find = '✿'; |
||
5436 | $result = mb_strstr($string, $find, true); |
||
5437 | $expected = '✰✱✲✳✴✵✶✷✸✹✺✻✼✽✾'; |
||
5438 | $this->assertEquals($expected, $result); |
||
5439 | |||
5440 | $string = '⺀⺁⺂⺃⺄⺅⺆⺇⺈⺉⺊⺋⺌⺍⺎⺏⺐⺑⺒⺓⺔⺕⺖⺗⺘⺙⺛⺜⺝⺞⺟⺠⺡⺢⺣⺤⺥⺦⺧⺨⺩⺪⺫⺬⺭⺮⺯⺰⺱⺲⺳⺴⺵⺶⺷⺸⺹⺺⺻⺼⺽⺾⺿⻀⻁⻂⻃⻄⻅⻆⻇⻈⻉⻊⻋⻌⻍⻎⻏⻐⻑⻒⻓⻔⻕⻖⻗⻘⻙⻚⻛⻜⻝⻞⻟⻠'; |
||
5441 | $find = '⺐'; |
||
5442 | $result = mb_strstr($string, $find); |
||
5443 | $expected = '⺐⺑⺒⺓⺔⺕⺖⺗⺘⺙⺛⺜⺝⺞⺟⺠⺡⺢⺣⺤⺥⺦⺧⺨⺩⺪⺫⺬⺭⺮⺯⺰⺱⺲⺳⺴⺵⺶⺷⺸⺹⺺⺻⺼⺽⺾⺿⻀⻁⻂⻃⻄⻅⻆⻇⻈⻉⻊⻋⻌⻍⻎⻏⻐⻑⻒⻓⻔⻕⻖⻗⻘⻙⻚⻛⻜⻝⻞⻟⻠'; |
||
5444 | $this->assertEquals($expected, $result); |
||
5445 | |||
5446 | $string = '⺀⺁⺂⺃⺄⺅⺆⺇⺈⺉⺊⺋⺌⺍⺎⺏⺐⺑⺒⺓⺔⺕⺖⺗⺘⺙⺛⺜⺝⺞⺟⺠⺡⺢⺣⺤⺥⺦⺧⺨⺩⺪⺫⺬⺭⺮⺯⺰⺱⺲⺳⺴⺵⺶⺷⺸⺹⺺⺻⺼⺽⺾⺿⻀⻁⻂⻃⻄⻅⻆⻇⻈⻉⻊⻋⻌⻍⻎⻏⻐⻑⻒⻓⻔⻕⻖⻗⻘⻙⻚⻛⻜⻝⻞⻟⻠'; |
||
5447 | $find = '⺐'; |
||
5448 | $result = mb_strstr($string, $find, true); |
||
5449 | $expected = '⺀⺁⺂⺃⺄⺅⺆⺇⺈⺉⺊⺋⺌⺍⺎⺏'; |
||
5450 | $this->assertEquals($expected, $result); |
||
5451 | |||
5452 | $string = '⽅⽆⽇⽈⽉⽊⽋⽌⽍⽎⽏⽐⽑⽒⽓⽔⽕⽖⽗⽘⽙⽚⽛⽜⽝⽞⽟⽠⽡⽢⽣⽤⽥⽦⽧⽨⽩⽪⽫⽬⽭⽮⽯⽰⽱⽲⽳⽴⽵⽶⽷⽸⽹⽺⽻⽼⽽⽾⽿'; |
||
5453 | $find = '⽤'; |
||
5454 | $result = mb_strstr($string, $find); |
||
5455 | $expected = '⽤⽥⽦⽧⽨⽩⽪⽫⽬⽭⽮⽯⽰⽱⽲⽳⽴⽵⽶⽷⽸⽹⽺⽻⽼⽽⽾⽿'; |
||
5456 | $this->assertEquals($expected, $result); |
||
5457 | |||
5458 | $string = '⽅⽆⽇⽈⽉⽊⽋⽌⽍⽎⽏⽐⽑⽒⽓⽔⽕⽖⽗⽘⽙⽚⽛⽜⽝⽞⽟⽠⽡⽢⽣⽤⽥⽦⽧⽨⽩⽪⽫⽬⽭⽮⽯⽰⽱⽲⽳⽴⽵⽶⽷⽸⽹⽺⽻⽼⽽⽾⽿'; |
||
5459 | $find = '⽤'; |
||
5460 | $result = mb_strstr($string, $find, true); |
||
5461 | $expected = '⽅⽆⽇⽈⽉⽊⽋⽌⽍⽎⽏⽐⽑⽒⽓⽔⽕⽖⽗⽘⽙⽚⽛⽜⽝⽞⽟⽠⽡⽢⽣'; |
||
5462 | $this->assertEquals($expected, $result); |
||
5463 | |||
5464 | $string = '눡눢눣눤눥눦눧눨눩눪눫눬눭눮눯눰눱눲눳눴눵눶눷눸눹눺눻눼눽눾눿뉀뉁뉂뉃뉄뉅뉆뉇뉈뉉뉊뉋뉌뉍뉎뉏뉐뉑뉒뉓뉔뉕뉖뉗뉘뉙뉚뉛뉜뉝뉞뉟뉠뉡뉢뉣뉤뉥뉦뉧뉨뉩뉪뉫뉬뉭뉮뉯뉰뉱뉲뉳뉴뉵뉶뉷뉸뉹뉺뉻뉼뉽뉾뉿늀늁늂늃늄'; |
||
5465 | $find = '눻'; |
||
5466 | $result = mb_strstr($string, $find); |
||
5467 | $expected = '눻눼눽눾눿뉀뉁뉂뉃뉄뉅뉆뉇뉈뉉뉊뉋뉌뉍뉎뉏뉐뉑뉒뉓뉔뉕뉖뉗뉘뉙뉚뉛뉜뉝뉞뉟뉠뉡뉢뉣뉤뉥뉦뉧뉨뉩뉪뉫뉬뉭뉮뉯뉰뉱뉲뉳뉴뉵뉶뉷뉸뉹뉺뉻뉼뉽뉾뉿늀늁늂늃늄'; |
||
5468 | $this->assertEquals($expected, $result); |
||
5469 | |||
5470 | $string = '눡눢눣눤눥눦눧눨눩눪눫눬눭눮눯눰눱눲눳눴눵눶눷눸눹눺눻눼눽눾눿뉀뉁뉂뉃뉄뉅뉆뉇뉈뉉뉊뉋뉌뉍뉎뉏뉐뉑뉒뉓뉔뉕뉖뉗뉘뉙뉚뉛뉜뉝뉞뉟뉠뉡뉢뉣뉤뉥뉦뉧뉨뉩뉪뉫뉬뉭뉮뉯뉰뉱뉲뉳뉴뉵뉶뉷뉸뉹뉺뉻뉼뉽뉾뉿늀늁늂늃늄'; |
||
5471 | $find = '눻'; |
||
5472 | $result = mb_strstr($string, $find, true); |
||
5473 | $expected = '눡눢눣눤눥눦눧눨눩눪눫눬눭눮눯눰눱눲눳눴눵눶눷눸눹눺'; |
||
5474 | $this->assertEquals($expected, $result); |
||
5475 | |||
5476 | $string = 'ﹰﹱﹲﹳﹴﹶﹷﹸﹹﹺﹻﹼﹽﹾﹿﺀﺁﺂﺃﺄﺅﺆﺇﺈﺉﺊﺋﺌﺍﺎﺏﺐﺑﺒﺓﺔﺕﺖﺗﺘﺙﺚﺛﺜﺝﺞﺟﺠﺡﺢﺣﺤﺥﺦﺧﺨﺩﺪﺫﺬﺭﺮﺯﺰ'; |
||
5477 | $find = 'ﺞ'; |
||
5478 | $result = mb_strstr($string, $find); |
||
5479 | $expected = 'ﺞﺟﺠﺡﺢﺣﺤﺥﺦﺧﺨﺩﺪﺫﺬﺭﺮﺯﺰ'; |
||
5480 | $this->assertEquals($expected, $result); |
||
5481 | |||
5482 | $string = 'ﹰﹱﹲﹳﹴﹶﹷﹸﹹﹺﹻﹼﹽﹾﹿﺀﺁﺂﺃﺄﺅﺆﺇﺈﺉﺊﺋﺌﺍﺎﺏﺐﺑﺒﺓﺔﺕﺖﺗﺘﺙﺚﺛﺜﺝﺞﺟﺠﺡﺢﺣﺤﺥﺦﺧﺨﺩﺪﺫﺬﺭﺮﺯﺰ'; |
||
5483 | $find = 'ﺞ'; |
||
5484 | $result = mb_strstr($string, $find, true); |
||
5485 | $expected = 'ﹰﹱﹲﹳﹴﹶﹷﹸﹹﹺﹻﹼﹽﹾﹿﺀﺁﺂﺃﺄﺅﺆﺇﺈﺉﺊﺋﺌﺍﺎﺏﺐﺑﺒﺓﺔﺕﺖﺗﺘﺙﺚﺛﺜﺝ'; |
||
5486 | $this->assertEquals($expected, $result); |
||
5487 | |||
5488 | $string = 'ﺱﺲﺳﺴﺵﺶﺷﺸﺹﺺﺻﺼﺽﺾﺿﻀﻁﻂﻃﻄﻅﻆﻇﻈﻉﻊﻋﻌﻍﻎﻏﻐﻑﻒﻓﻔﻕﻖﻗﻘﻙﻚﻛﻜﻝﻞﻟﻠﻡﻢﻣﻤﻥﻦﻧﻨﻩﻪﻫﻬﻭﻮﻯﻰﻱﻲﻳﻴﻵﻶﻷﻸﻹﻺﻻﻼ'; |
||
5489 | $find = 'ﻞ'; |
||
5490 | $result = mb_strstr($string, $find); |
||
5491 | $expected = 'ﻞﻟﻠﻡﻢﻣﻤﻥﻦﻧﻨﻩﻪﻫﻬﻭﻮﻯﻰﻱﻲﻳﻴﻵﻶﻷﻸﻹﻺﻻﻼ'; |
||
5492 | $this->assertEquals($expected, $result); |
||
5493 | |||
5494 | $string = 'ﺱﺲﺳﺴﺵﺶﺷﺸﺹﺺﺻﺼﺽﺾﺿﻀﻁﻂﻃﻄﻅﻆﻇﻈﻉﻊﻋﻌﻍﻎﻏﻐﻑﻒﻓﻔﻕﻖﻗﻘﻙﻚﻛﻜﻝﻞﻟﻠﻡﻢﻣﻤﻥﻦﻧﻨﻩﻪﻫﻬﻭﻮﻯﻰﻱﻲﻳﻴﻵﻶﻷﻸﻹﻺﻻﻼ'; |
||
5495 | $find = 'ﻞ'; |
||
5496 | $result = mb_strstr($string, $find, true); |
||
5497 | $expected = 'ﺱﺲﺳﺴﺵﺶﺷﺸﺹﺺﺻﺼﺽﺾﺿﻀﻁﻂﻃﻄﻅﻆﻇﻈﻉﻊﻋﻌﻍﻎﻏﻐﻑﻒﻓﻔﻕﻖﻗﻘﻙﻚﻛﻜﻝ'; |
||
5498 | $this->assertEquals($expected, $result); |
||
5499 | |||
5500 | $string = 'abcdefghijklmnopqrstuvwxyz'; |
||
5501 | $find = 'k'; |
||
5502 | $result = mb_strstr($string, $find); |
||
5503 | $expected = 'klmnopqrstuvwxyz'; |
||
5504 | $this->assertEquals($expected, $result); |
||
5505 | |||
5506 | $string = 'abcdefghijklmnopqrstuvwxyz'; |
||
5507 | $find = 'k'; |
||
5508 | $result = mb_strstr($string, $find, true); |
||
5509 | $expected = 'abcdefghij'; |
||
5510 | $this->assertEquals($expected, $result); |
||
5511 | |||
5512 | $string = 'abcdefghijklmnopqrstuvwxyz'; |
||
5513 | $find = 'K'; |
||
5514 | $result = mb_strstr($string, $find); |
||
5515 | $expected = false; |
||
5516 | $this->assertEquals($expected, $result); |
||
5517 | |||
5518 | $string = '。「」、・ヲァィゥェォャュョッーアイウエオカキク'; |
||
5519 | $find = 'ア'; |
||
5520 | $result = mb_strstr($string, $find); |
||
5521 | $expected = 'アイウエオカキク'; |
||
5522 | $this->assertEquals($expected, $result); |
||
5523 | |||
5524 | $string = '。「」、・ヲァィゥェォャュョッーアイウエオカキク'; |
||
5525 | $find = 'ア'; |
||
5526 | $result = mb_strstr($string, $find, true); |
||
5527 | $expected = '。「」、・ヲァィゥェォャュョッー'; |
||
5528 | $this->assertEquals($expected, $result); |
||
5529 | |||
5530 | $string = 'ケコサシスセソタチツテトナニヌネノハヒフヘホマミムメモヤユヨラリルレロワン゙'; |
||
5531 | $find = 'ハ'; |
||
5532 | $result = mb_strstr($string, $find); |
||
5533 | $expected = 'ハヒフヘホマミムメモヤユヨラリルレロワン゙'; |
||
5534 | $this->assertEquals($expected, $result); |
||
5535 | |||
5536 | $string = 'ケコサシスセソタチツテトナニヌネノハヒフヘホマミムメモヤユヨラリルレロワン゙'; |
||
5537 | $find = 'ハ'; |
||
5538 | $result = mb_strstr($string, $find, true); |
||
5539 | $expected = 'ケコサシスセソタチツテトナニヌネノ'; |
||
5540 | $this->assertEquals($expected, $result); |
||
5541 | |||
5542 | $string = 'Ĥēĺļŏ, Ŵőřļď!'; |
||
5543 | $find = 'ő'; |
||
5544 | $result = mb_strstr($string, $find); |
||
5545 | $expected = 'őřļď!'; |
||
5546 | $this->assertEquals($expected, $result); |
||
5547 | |||
5548 | $string = 'Ĥēĺļŏ, Ŵőřļď!'; |
||
5549 | $find = 'ő'; |
||
5550 | $result = mb_strstr($string, $find, true); |
||
5551 | $expected = 'Ĥēĺļŏ, Ŵ'; |
||
5552 | $this->assertEquals($expected, $result); |
||
5553 | |||
5554 | $string = 'Ĥēĺļŏ, Ŵőřļď!'; |
||
5555 | $find = 'ĺļ'; |
||
5556 | $result = mb_strstr($string, $find, true); |
||
5557 | $expected = 'Ĥē'; |
||
5558 | $this->assertEquals($expected, $result); |
||
5559 | |||
5560 | $string = 'Hello, World!'; |
||
5561 | $find = 'o'; |
||
5562 | $result = mb_strstr($string, $find); |
||
5563 | $expected = 'o, World!'; |
||
5564 | $this->assertEquals($expected, $result); |
||
5565 | |||
5566 | $string = 'Hello, World!'; |
||
5567 | $find = 'o'; |
||
5568 | $result = mb_strstr($string, $find, true); |
||
5569 | $expected = 'Hell'; |
||
5570 | $this->assertEquals($expected, $result); |
||
5571 | |||
5572 | $string = 'Hello, World!'; |
||
5573 | $find = 'Wo'; |
||
5574 | $result = mb_strstr($string, $find); |
||
5575 | $expected = 'World!'; |
||
5576 | $this->assertEquals($expected, $result); |
||
5577 | |||
5578 | $string = 'Hello, World!'; |
||
5579 | $find = 'Wo'; |
||
5580 | $result = mb_strstr($string, $find, true); |
||
5581 | $expected = 'Hello, '; |
||
5582 | $this->assertEquals($expected, $result); |
||
5583 | |||
5584 | $string = 'Hello, World!'; |
||
5585 | $find = 'll'; |
||
5586 | $result = mb_strstr($string, $find); |
||
5587 | $expected = 'llo, World!'; |
||
5588 | $this->assertEquals($expected, $result); |
||
5589 | |||
5590 | $string = 'Hello, World!'; |
||
5591 | $find = 'll'; |
||
5592 | $result = mb_strstr($string, $find, true); |
||
5593 | $expected = 'He'; |
||
5594 | $this->assertEquals($expected, $result); |
||
5595 | |||
5596 | $string = 'Hello, World!'; |
||
5597 | $find = 'rld'; |
||
5598 | $result = mb_strstr($string, $find); |
||
5599 | $expected = 'rld!'; |
||
5600 | $this->assertEquals($expected, $result); |
||
5601 | |||
5602 | $string = 'Hello, World!'; |
||
5603 | $find = 'rld'; |
||
5604 | $result = mb_strstr($string, $find, true); |
||
5605 | $expected = 'Hello, Wo'; |
||
5606 | $this->assertEquals($expected, $result); |
||
5607 | |||
5608 | $string = 'čini'; |
||
5609 | $find = 'n'; |
||
5610 | $result = mb_strstr($string, $find); |
||
5611 | $expected = 'ni'; |
||
5612 | $this->assertEquals($expected, $result); |
||
5613 | |||
5614 | $string = 'čini'; |
||
5615 | $find = 'n'; |
||
5616 | $result = mb_strstr($string, $find, true); |
||
5617 | $expected = 'či'; |
||
5618 | $this->assertEquals($expected, $result); |
||
5619 | |||
5620 | $string = 'moći'; |
||
5621 | $find = 'ć'; |
||
5622 | $result = mb_strstr($string, $find); |
||
5623 | $expected = 'ći'; |
||
5624 | $this->assertEquals($expected, $result); |
||
5625 | |||
5626 | $string = 'moći'; |
||
5627 | $find = 'ć'; |
||
5628 | $result = mb_strstr($string, $find, true); |
||
5629 | $expected = 'mo'; |
||
5630 | $this->assertEquals($expected, $result); |
||
5631 | |||
5632 | $string = 'državni'; |
||
5633 | $find = 'ž'; |
||
5634 | $result = mb_strstr($string, $find); |
||
5635 | $expected = 'žavni'; |
||
5636 | $this->assertEquals($expected, $result); |
||
5637 | |||
5638 | $string = 'državni'; |
||
5639 | $find = 'ž'; |
||
5640 | $result = mb_strstr($string, $find, true); |
||
5641 | $expected = 'dr'; |
||
5642 | $this->assertEquals($expected, $result); |
||
5643 | |||
5644 | $string = '把百度设为首页'; |
||
5645 | $find = '设'; |
||
5646 | $result = mb_strstr($string, $find); |
||
5647 | $expected = '设为首页'; |
||
5648 | $this->assertEquals($expected, $result); |
||
5649 | |||
5650 | $string = '把百度设为首页'; |
||
5651 | $find = '设'; |
||
5652 | $result = mb_strstr($string, $find, true); |
||
5653 | $expected = '把百度'; |
||
5654 | $this->assertEquals($expected, $result); |
||
5655 | |||
5656 | $string = '一二三周永龍'; |
||
5657 | $find = '周'; |
||
5658 | $result = mb_strstr($string, $find); |
||
5659 | $expected = '周永龍'; |
||
5660 | $this->assertEquals($expected, $result); |
||
5661 | |||
5662 | $string = '一二三周永龍'; |
||
5663 | $find = '周'; |
||
5664 | $result = mb_strstr($string, $find, true); |
||
5665 | $expected = '一二三'; |
||
5666 | $this->assertEquals($expected, $result); |
||
5667 | |||
5668 | $string = '一二三周永龍'; |
||
5669 | $find = '二周'; |
||
5670 | $result = mb_strstr($string, $find); |
||
5671 | $expected = false; |
||
5672 | $this->assertEquals($expected, $result); |
||
5673 | } |
||
5674 | |||
5675 | /**
|
||
5676 | * testMultibyteStrstr method
|
||
5677 | *
|
||
5678 | * @return void
|
||
5679 | */
|
||
5680 | public function testMultibyteStrstr() { |
||
5681 | $string = 'ABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789'; |
||
5682 | $find = 'F'; |
||
5683 | $result = Multibyte::strstr($string, $find); |
||
5684 | $expected = 'FGHIJKLMNOPQRSTUVWXYZ0123456789'; |
||
5685 | $this->assertEquals($expected, $result); |
||
5686 | |||
5687 | $string = 'ABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789'; |
||
5688 | $find = 'F'; |
||
5689 | $result = Multibyte::strstr($string, $find, true); |
||
5690 | $expected = 'ABCDE'; |
||
5691 | $this->assertEquals($expected, $result); |
||
5692 | |||
5693 | $string = 'ÀÁÂÃÄÅÆÇÈÉÊËÌÍÎÏÐÑÒÓÔÕÖØÙÚÛÜÝÞ'; |
||
5694 | $find = 'Å'; |
||
5695 | $result = Multibyte::strstr($string, $find); |
||
5696 | $expected = 'ÅÆÇÈÉÊËÌÍÎÏÐÑÒÓÔÕÖØÙÚÛÜÝÞ'; |
||
5697 | $this->assertEquals($expected, $result); |
||
5698 | |||
5699 | $string = 'ÀÁÂÃÄÅÆÇÈÉÊËÌÍÎÏÐÑÒÓÔÕÖØÙÚÛÜÝÞ'; |
||
5700 | $find = 'Å'; |
||
5701 | $result = Multibyte::strstr($string, $find, true); |
||
5702 | $expected = 'ÀÁÂÃÄ'; |
||
5703 | $this->assertEquals($expected, $result); |
||
5704 | |||
5705 | $string = 'ĀĂĄĆĈĊČĎĐĒĔĖĘĚĜĞĠĢĤĦĨĪĬĮIJĴĶĹĻĽĿŁŃŅŇŊŌŎŐŒŔŖŘŚŜŞŠŢŤŦŨŪŬŮŰŲŴŶŹŻŽ'; |
||
5706 | $find = 'Ċ'; |
||
5707 | $result = Multibyte::strstr($string, $find); |
||
5708 | $expected = 'ĊČĎĐĒĔĖĘĚĜĞĠĢĤĦĨĪĬĮIJĴĶĹĻĽĿŁŃŅŇŊŌŎŐŒŔŖŘŚŜŞŠŢŤŦŨŪŬŮŰŲŴŶŹŻŽ'; |
||
5709 | $this->assertEquals($expected, $result); |
||
5710 | |||
5711 | $string = 'ĀĂĄĆĈĊČĎĐĒĔĖĘĚĜĞĠĢĤĦĨĪĬĮIJĴĶĹĻĽĿŁŃŅŇŊŌŎŐŒŔŖŘŚŜŞŠŢŤŦŨŪŬŮŰŲŴŶŹŻŽ'; |
||
5712 | $find = 'Ċ'; |
||
5713 | $result = Multibyte::strstr($string, $find, true); |
||
5714 | $expected = 'ĀĂĄĆĈ'; |
||
5715 | $this->assertEquals($expected, $result); |
||
5716 | |||
5717 | $string = '!"#$%&\'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~'; |
||
5718 | $find = 'F'; |
||
5719 | $result = Multibyte::strstr($string, $find); |
||
5720 | $expected = 'FGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~'; |
||
5721 | $this->assertEquals($expected, $result); |
||
5722 | |||
5723 | $string = '!"#$%&\'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~'; |
||
5724 | $find = 'F'; |
||
5725 | $result = Multibyte::strstr($string, $find, true); |
||
5726 | $expected = '!"#$%&\'()*+,-./0123456789:;<=>?@ABCDE'; |
||
5727 | $this->assertEquals($expected, $result); |
||
5728 | |||
5729 | $string = '¡¢£¤¥¦§¨©ª«¬®¯°±²³´µ¶·¸¹º»¼½¾¿ÀÁÂÃÄÅÆÇÈ'; |
||
5730 | $find = 'µ'; |
||
5731 | $result = Multibyte::strstr($string, $find); |
||
5732 | $expected = 'µ¶·¸¹º»¼½¾¿ÀÁÂÃÄÅÆÇÈ'; |
||
5733 | $this->assertEquals($expected, $result); |
||
5734 | |||
5735 | $string = '¡¢£¤¥¦§¨©ª«¬®¯°±²³´µ¶·¸¹º»¼½¾¿ÀÁÂÃÄÅÆÇÈ'; |
||
5736 | $find = 'µ'; |
||
5737 | $result = Multibyte::strstr($string, $find, true); |
||
5738 | $expected = '¡¢£¤¥¦§¨©ª«¬®¯°±²³´'; |
||
5739 | $this->assertEquals($expected, $result); |
||
5740 | |||
5741 | $string = 'ÉÊËÌÍÎÏÐÑÒÓÔÕÖ×ØÙÚÛÜÝÞßàáâãäåæçèéêëìíîïðñòóôõö÷øùúûüýþÿĀāĂ㥹ĆćĈĉĊċČčĎďĐđĒēĔĕĖėĘęĚěĜĝĞğĠġĢģĤĥĦħĨĩĪīĬ'; |
||
5742 | $find = 'Þ'; |
||
5743 | $result = Multibyte::strstr($string, $find); |
||
5744 | $expected = 'Þßàáâãäåæçèéêëìíîïðñòóôõö÷øùúûüýþÿĀāĂ㥹ĆćĈĉĊċČčĎďĐđĒēĔĕĖėĘęĚěĜĝĞğĠġĢģĤĥĦħĨĩĪīĬ'; |
||
5745 | $this->assertEquals($expected, $result); |
||
5746 | |||
5747 | $string = 'ÉÊËÌÍÎÏÐÑÒÓÔÕÖ×ØÙÚÛÜÝÞßàáâãäåæçèéêëìíîïðñòóôõö÷øùúûüýþÿĀāĂ㥹ĆćĈĉĊċČčĎďĐđĒēĔĕĖėĘęĚěĜĝĞğĠġĢģĤĥĦħĨĩĪīĬ'; |
||
5748 | $find = 'Þ'; |
||
5749 | $result = Multibyte::strstr($string, $find, true); |
||
5750 | $expected = 'ÉÊËÌÍÎÏÐÑÒÓÔÕÖ×ØÙÚÛÜÝ'; |
||
5751 | $this->assertEquals($expected, $result); |
||
5752 | |||
5753 | $string = 'ĭĮįİıIJijĴĵĶķĸĹĺĻļĽľĿŀŁłŃńŅņŇňʼnŊŋŌōŎŏŐőŒœŔŕŖŗŘřŚśŜŝŞşŠšŢţŤťŦŧŨũŪūŬŭŮůŰűŲųŴŵŶŷŸŹźŻżŽžſƀƁƂƃƄƅƆƇƈƉƊƋƌƍƎƏƐ'; |
||
5754 | $find = 'Ņ'; |
||
5755 | $result = Multibyte::strstr($string, $find); |
||
5756 | $expected = 'ŅņŇňʼnŊŋŌōŎŏŐőŒœŔŕŖŗŘřŚśŜŝŞşŠšŢţŤťŦŧŨũŪūŬŭŮůŰűŲųŴŵŶŷŸŹźŻżŽžſƀƁƂƃƄƅƆƇƈƉƊƋƌƍƎƏƐ'; |
||
5757 | $this->assertEquals($expected, $result); |
||
5758 | |||
5759 | $string = 'ĭĮįİıIJijĴĵĶķĸĹĺĻļĽľĿŀŁłŃńŅņŇňʼnŊŋŌōŎŏŐőŒœŔŕŖŗŘřŚśŜŝŞşŠšŢţŤťŦŧŨũŪūŬŭŮůŰűŲųŴŵŶŷŸŹźŻżŽžſƀƁƂƃƄƅƆƇƈƉƊƋƌƍƎƏƐ'; |
||
5760 | $find = 'Ņ'; |
||
5761 | $result = Multibyte::strstr($string, $find, true); |
||
5762 | $expected = 'ĭĮįİıIJijĴĵĶķĸĹĺĻļĽľĿŀŁłŃń'; |
||
5763 | $this->assertEquals($expected, $result); |
||
5764 | |||
5765 | $string = 'ƑƒƓƔƕƖƗƘƙƚƛƜƝƞƟƠơƢƣƤƥƦƧƨƩƪƫƬƭƮƯưƱƲƳƴƵƶƷƸƹƺƻƼƽƾƿǀǁǂǃDŽDždžLJLjljNJNjnjǍǎǏǐǑǒǓǔǕǖǗǘǙǚǛǜǝǞǟǠǡǢǣǤǥǦǧǨǩǪǫǬǭǮǯǰDZDzdzǴ'; |
||
5766 | $find = 'Ƹ'; |
||
5767 | $result = Multibyte::strstr($string, $find); |
||
5768 | $expected = 'ƸƹƺƻƼƽƾƿǀǁǂǃDŽDždžLJLjljNJNjnjǍǎǏǐǑǒǓǔǕǖǗǘǙǚǛǜǝǞǟǠǡǢǣǤǥǦǧǨǩǪǫǬǭǮǯǰDZDzdzǴ'; |
||
5769 | $this->assertEquals($expected, $result); |
||
5770 | |||
5771 | $find = 'Ƹ'; |
||
5772 | $result = Multibyte::strstr($string, $find, true); |
||
5773 | $expected = 'ƑƒƓƔƕƖƗƘƙƚƛƜƝƞƟƠơƢƣƤƥƦƧƨƩƪƫƬƭƮƯưƱƲƳƴƵƶƷ'; |
||
5774 | $this->assertEquals($expected, $result); |
||
5775 | |||
5776 | $string = 'əɚɛɜɝɞɟɠɡɢɣɤɥɦɧɨɩɪɫɬɭɮɯɰɱɲɳɴɵɶɷɸɹɺɻɼɽɾɿʀʁʂʃʄʅʆʇʈʉʊʋʌʍʎʏʐʑʒʓʔʕʖʗʘʙʚʛʜʝʞʟʠʡʢʣʤʥʦʧʨʩʪʫʬʭʮʯʰʱʲʳʴʵʶʷʸʹʺʻʼ'; |
||
5777 | $find = 'ʀ'; |
||
5778 | $result = Multibyte::strstr($string, $find); |
||
5779 | $expected = 'ʀʁʂʃʄʅʆʇʈʉʊʋʌʍʎʏʐʑʒʓʔʕʖʗʘʙʚʛʜʝʞʟʠʡʢʣʤʥʦʧʨʩʪʫʬʭʮʯʰʱʲʳʴʵʶʷʸʹʺʻʼ'; |
||
5780 | $this->assertEquals($expected, $result); |
||
5781 | |||
5782 | $string = 'əɚɛɜɝɞɟɠɡɢɣɤɥɦɧɨɩɪɫɬɭɮɯɰɱɲɳɴɵɶɷɸɹɺɻɼɽɾɿʀʁʂʃʄʅʆʇʈʉʊʋʌʍʎʏʐʑʒʓʔʕʖʗʘʙʚʛʜʝʞʟʠʡʢʣʤʥʦʧʨʩʪʫʬʭʮʯʰʱʲʳʴʵʶʷʸʹʺʻʼ'; |
||
5783 | $find = 'ʀ'; |
||
5784 | $result = Multibyte::strstr($string, $find, true); |
||
5785 | $expected = 'əɚɛɜɝɞɟɠɡɢɣɤɥɦɧɨɩɪɫɬɭɮɯɰɱɲɳɴɵɶɷɸɹɺɻɼɽɾɿ'; |
||
5786 | $this->assertEquals($expected, $result); |
||
5787 | |||
5788 | $string = 'ЀЁЂЃЄЅІЇЈЉЊЋЌЍЎЏАБВГДЕЖЗИЙКЛ'; |
||
5789 | $find = 'Ї'; |
||
5790 | $result = Multibyte::strstr($string, $find); |
||
5791 | $expected = 'ЇЈЉЊЋЌЍЎЏАБВГДЕЖЗИЙКЛ'; |
||
5792 | $this->assertEquals($expected, $result); |
||
5793 | |||
5794 | $string = 'ЀЁЂЃЄЅІЇЈЉЊЋЌЍЎЏАБВГДЕЖЗИЙКЛ'; |
||
5795 | $find = 'Ї'; |
||
5796 | $result = Multibyte::strstr($string, $find, true); |
||
5797 | $expected = 'ЀЁЂЃЄЅІ'; |
||
5798 | $this->assertEquals($expected, $result); |
||
5799 | |||
5800 | $string = 'МНОПРСТУФХЦЧШЩЪЫЬЭЮЯабвгдежзийклмнопрстуфхцчшщъыь'; |
||
5801 | $find = 'Р'; |
||
5802 | $result = Multibyte::strstr($string, $find); |
||
5803 | $expected = 'РСТУФХЦЧШЩЪЫЬЭЮЯабвгдежзийклмнопрстуфхцчшщъыь'; |
||
5804 | $this->assertEquals($expected, $result); |
||
5805 | |||
5806 | $string = 'МНОПРСТУФХЦЧШЩЪЫЬЭЮЯабвгдежзийклмнопрстуфхцчшщъыь'; |
||
5807 | $find = 'Р'; |
||
5808 | $result = Multibyte::strstr($string, $find, true); |
||
5809 | $expected = 'МНОП'; |
||
5810 | $this->assertEquals($expected, $result); |
||
5811 | |||
5812 | $string = 'فقكلمنهوىيًٌٍَُ'; |
||
5813 | $find = 'ن'; |
||
5814 | $result = Multibyte::strstr($string, $find); |
||
5815 | $expected = 'نهوىيًٌٍَُ'; |
||
5816 | $this->assertEquals($expected, $result); |
||
5817 | |||
5818 | $string = 'فقكلمنهوىيًٌٍَُ'; |
||
5819 | $find = 'ن'; |
||
5820 | $result = Multibyte::strstr($string, $find, true); |
||
5821 | $expected = 'فقكلم'; |
||
5822 | $this->assertEquals($expected, $result); |
||
5823 | |||
5824 | $string = '✰✱✲✳✴✵✶✷✸✹✺✻✼✽✾✿❀❁❂❃❄❅❆❇❈❉❊❋❌❍❎❏❐❑❒❓❔❕❖❗❘❙❚❛❜❝❞'; |
||
5825 | $find = '✿'; |
||
5826 | $result = Multibyte::strstr($string, $find); |
||
5827 | $expected = '✿❀❁❂❃❄❅❆❇❈❉❊❋❌❍❎❏❐❑❒❓❔❕❖❗❘❙❚❛❜❝❞'; |
||
5828 | $this->assertEquals($expected, $result); |
||
5829 | |||
5830 | $string = '✰✱✲✳✴✵✶✷✸✹✺✻✼✽✾✿❀❁❂❃❄❅❆❇❈❉❊❋❌❍❎❏❐❑❒❓❔❕❖❗❘❙❚❛❜❝❞'; |
||
5831 | $find = '✿'; |
||
5832 | $result = Multibyte::strstr($string, $find, true); |
||
5833 | $expected = '✰✱✲✳✴✵✶✷✸✹✺✻✼✽✾'; |
||
5834 | $this->assertEquals($expected, $result); |
||
5835 | |||
5836 | $string = '⺀⺁⺂⺃⺄⺅⺆⺇⺈⺉⺊⺋⺌⺍⺎⺏⺐⺑⺒⺓⺔⺕⺖⺗⺘⺙⺛⺜⺝⺞⺟⺠⺡⺢⺣⺤⺥⺦⺧⺨⺩⺪⺫⺬⺭⺮⺯⺰⺱⺲⺳⺴⺵⺶⺷⺸⺹⺺⺻⺼⺽⺾⺿⻀⻁⻂⻃⻄⻅⻆⻇⻈⻉⻊⻋⻌⻍⻎⻏⻐⻑⻒⻓⻔⻕⻖⻗⻘⻙⻚⻛⻜⻝⻞⻟⻠'; |
||
5837 | $find = '⺐'; |
||
5838 | $result = Multibyte::strstr($string, $find); |
||
5839 | $expected = '⺐⺑⺒⺓⺔⺕⺖⺗⺘⺙⺛⺜⺝⺞⺟⺠⺡⺢⺣⺤⺥⺦⺧⺨⺩⺪⺫⺬⺭⺮⺯⺰⺱⺲⺳⺴⺵⺶⺷⺸⺹⺺⺻⺼⺽⺾⺿⻀⻁⻂⻃⻄⻅⻆⻇⻈⻉⻊⻋⻌⻍⻎⻏⻐⻑⻒⻓⻔⻕⻖⻗⻘⻙⻚⻛⻜⻝⻞⻟⻠'; |
||
5840 | $this->assertEquals($expected, $result); |
||
5841 | |||
5842 | $string = '⺀⺁⺂⺃⺄⺅⺆⺇⺈⺉⺊⺋⺌⺍⺎⺏⺐⺑⺒⺓⺔⺕⺖⺗⺘⺙⺛⺜⺝⺞⺟⺠⺡⺢⺣⺤⺥⺦⺧⺨⺩⺪⺫⺬⺭⺮⺯⺰⺱⺲⺳⺴⺵⺶⺷⺸⺹⺺⺻⺼⺽⺾⺿⻀⻁⻂⻃⻄⻅⻆⻇⻈⻉⻊⻋⻌⻍⻎⻏⻐⻑⻒⻓⻔⻕⻖⻗⻘⻙⻚⻛⻜⻝⻞⻟⻠'; |
||
5843 | $find = '⺐'; |
||
5844 | $result = Multibyte::strstr($string, $find, true); |
||
5845 | $expected = '⺀⺁⺂⺃⺄⺅⺆⺇⺈⺉⺊⺋⺌⺍⺎⺏'; |
||
5846 | $this->assertEquals($expected, $result); |
||
5847 | |||
5848 | $string = '⽅⽆⽇⽈⽉⽊⽋⽌⽍⽎⽏⽐⽑⽒⽓⽔⽕⽖⽗⽘⽙⽚⽛⽜⽝⽞⽟⽠⽡⽢⽣⽤⽥⽦⽧⽨⽩⽪⽫⽬⽭⽮⽯⽰⽱⽲⽳⽴⽵⽶⽷⽸⽹⽺⽻⽼⽽⽾⽿'; |
||
5849 | $find = '⽤'; |
||
5850 | $result = Multibyte::strstr($string, $find); |
||
5851 | $expected = '⽤⽥⽦⽧⽨⽩⽪⽫⽬⽭⽮⽯⽰⽱⽲⽳⽴⽵⽶⽷⽸⽹⽺⽻⽼⽽⽾⽿'; |
||
5852 | $this->assertEquals($expected, $result); |
||
5853 | |||
5854 | $string = '⽅⽆⽇⽈⽉⽊⽋⽌⽍⽎⽏⽐⽑⽒⽓⽔⽕⽖⽗⽘⽙⽚⽛⽜⽝⽞⽟⽠⽡⽢⽣⽤⽥⽦⽧⽨⽩⽪⽫⽬⽭⽮⽯⽰⽱⽲⽳⽴⽵⽶⽷⽸⽹⽺⽻⽼⽽⽾⽿'; |
||
5855 | $find = '⽤'; |
||
5856 | $result = Multibyte::strstr($string, $find, true); |
||
5857 | $expected = '⽅⽆⽇⽈⽉⽊⽋⽌⽍⽎⽏⽐⽑⽒⽓⽔⽕⽖⽗⽘⽙⽚⽛⽜⽝⽞⽟⽠⽡⽢⽣'; |
||
5858 | $this->assertEquals($expected, $result); |
||
5859 | |||
5860 | $string = '눡눢눣눤눥눦눧눨눩눪눫눬눭눮눯눰눱눲눳눴눵눶눷눸눹눺눻눼눽눾눿뉀뉁뉂뉃뉄뉅뉆뉇뉈뉉뉊뉋뉌뉍뉎뉏뉐뉑뉒뉓뉔뉕뉖뉗뉘뉙뉚뉛뉜뉝뉞뉟뉠뉡뉢뉣뉤뉥뉦뉧뉨뉩뉪뉫뉬뉭뉮뉯뉰뉱뉲뉳뉴뉵뉶뉷뉸뉹뉺뉻뉼뉽뉾뉿늀늁늂늃늄'; |
||
5861 | $find = '눻'; |
||
5862 | $result = Multibyte::strstr($string, $find); |
||
5863 | $expected = '눻눼눽눾눿뉀뉁뉂뉃뉄뉅뉆뉇뉈뉉뉊뉋뉌뉍뉎뉏뉐뉑뉒뉓뉔뉕뉖뉗뉘뉙뉚뉛뉜뉝뉞뉟뉠뉡뉢뉣뉤뉥뉦뉧뉨뉩뉪뉫뉬뉭뉮뉯뉰뉱뉲뉳뉴뉵뉶뉷뉸뉹뉺뉻뉼뉽뉾뉿늀늁늂늃늄'; |
||
5864 | $this->assertEquals($expected, $result); |
||
5865 | |||
5866 | $string = '눡눢눣눤눥눦눧눨눩눪눫눬눭눮눯눰눱눲눳눴눵눶눷눸눹눺눻눼눽눾눿뉀뉁뉂뉃뉄뉅뉆뉇뉈뉉뉊뉋뉌뉍뉎뉏뉐뉑뉒뉓뉔뉕뉖뉗뉘뉙뉚뉛뉜뉝뉞뉟뉠뉡뉢뉣뉤뉥뉦뉧뉨뉩뉪뉫뉬뉭뉮뉯뉰뉱뉲뉳뉴뉵뉶뉷뉸뉹뉺뉻뉼뉽뉾뉿늀늁늂늃늄'; |
||
5867 | $find = '눻'; |
||
5868 | $result = Multibyte::strstr($string, $find, true); |
||
5869 | $expected = '눡눢눣눤눥눦눧눨눩눪눫눬눭눮눯눰눱눲눳눴눵눶눷눸눹눺'; |
||
5870 | $this->assertEquals($expected, $result); |
||
5871 | |||
5872 | $string = 'ﹰﹱﹲﹳﹴﹶﹷﹸﹹﹺﹻﹼﹽﹾﹿﺀﺁﺂﺃﺄﺅﺆﺇﺈﺉﺊﺋﺌﺍﺎﺏﺐﺑﺒﺓﺔﺕﺖﺗﺘﺙﺚﺛﺜﺝﺞﺟﺠﺡﺢﺣﺤﺥﺦﺧﺨﺩﺪﺫﺬﺭﺮﺯﺰ'; |
||
5873 | $find = 'ﺞ'; |
||
5874 | $result = Multibyte::strstr($string, $find); |
||
5875 | $expected = 'ﺞﺟﺠﺡﺢﺣﺤﺥﺦﺧﺨﺩﺪﺫﺬﺭﺮﺯﺰ'; |
||
5876 | $this->assertEquals($expected, $result); |
||
5877 | |||
5878 | $string = 'ﹰﹱﹲﹳﹴﹶﹷﹸﹹﹺﹻﹼﹽﹾﹿﺀﺁﺂﺃﺄﺅﺆﺇﺈﺉﺊﺋﺌﺍﺎﺏﺐﺑﺒﺓﺔﺕﺖﺗﺘﺙﺚﺛﺜﺝﺞﺟﺠﺡﺢﺣﺤﺥﺦﺧﺨﺩﺪﺫﺬﺭﺮﺯﺰ'; |
||
5879 | $find = 'ﺞ'; |
||
5880 | $result = Multibyte::strstr($string, $find, true); |
||
5881 | $expected = 'ﹰﹱﹲﹳﹴﹶﹷﹸﹹﹺﹻﹼﹽﹾﹿﺀﺁﺂﺃﺄﺅﺆﺇﺈﺉﺊﺋﺌﺍﺎﺏﺐﺑﺒﺓﺔﺕﺖﺗﺘﺙﺚﺛﺜﺝ'; |
||
5882 | $this->assertEquals($expected, $result); |
||
5883 | |||
5884 | $string = 'ﺱﺲﺳﺴﺵﺶﺷﺸﺹﺺﺻﺼﺽﺾﺿﻀﻁﻂﻃﻄﻅﻆﻇﻈﻉﻊﻋﻌﻍﻎﻏﻐﻑﻒﻓﻔﻕﻖﻗﻘﻙﻚﻛﻜﻝﻞﻟﻠﻡﻢﻣﻤﻥﻦﻧﻨﻩﻪﻫﻬﻭﻮﻯﻰﻱﻲﻳﻴﻵﻶﻷﻸﻹﻺﻻﻼ'; |
||
5885 | $find = 'ﻞ'; |
||
5886 | $result = Multibyte::strstr($string, $find); |
||
5887 | $expected = 'ﻞﻟﻠﻡﻢﻣﻤﻥﻦﻧﻨﻩﻪﻫﻬﻭﻮﻯﻰﻱﻲﻳﻴﻵﻶﻷﻸﻹﻺﻻﻼ'; |
||
5888 | $this->assertEquals($expected, $result); |
||
5889 | |||
5890 | $string = 'ﺱﺲﺳﺴﺵﺶﺷﺸﺹﺺﺻﺼﺽﺾﺿﻀﻁﻂﻃﻄﻅﻆﻇﻈﻉﻊﻋﻌﻍﻎﻏﻐﻑﻒﻓﻔﻕﻖﻗﻘﻙﻚﻛﻜﻝﻞﻟﻠﻡﻢﻣﻤﻥﻦﻧﻨﻩﻪﻫﻬﻭﻮﻯﻰﻱﻲﻳﻴﻵﻶﻷﻸﻹﻺﻻﻼ'; |
||
5891 | $find = 'ﻞ'; |
||
5892 | $result = Multibyte::strstr($string, $find, true); |
||
5893 | $expected = 'ﺱﺲﺳﺴﺵﺶﺷﺸﺹﺺﺻﺼﺽﺾﺿﻀﻁﻂﻃﻄﻅﻆﻇﻈﻉﻊﻋﻌﻍﻎﻏﻐﻑﻒﻓﻔﻕﻖﻗﻘﻙﻚﻛﻜﻝ'; |
||
5894 | $this->assertEquals($expected, $result); |
||
5895 | |||
5896 | $string = 'abcdefghijklmnopqrstuvwxyz'; |
||
5897 | $find = 'k'; |
||
5898 | $result = Multibyte::strstr($string, $find); |
||
5899 | $expected = 'klmnopqrstuvwxyz'; |
||
5900 | $this->assertEquals($expected, $result); |
||
5901 | |||
5902 | $string = 'abcdefghijklmnopqrstuvwxyz'; |
||
5903 | $find = 'k'; |
||
5904 | $result = Multibyte::strstr($string, $find, true); |
||
5905 | $expected = 'abcdefghij'; |
||
5906 | $this->assertEquals($expected, $result); |
||
5907 | |||
5908 | $string = 'abcdefghijklmnopqrstuvwxyz'; |
||
5909 | $find = 'K'; |
||
5910 | $result = Multibyte::strstr($string, $find); |
||
5911 | $expected = false; |
||
5912 | $this->assertEquals($expected, $result); |
||
5913 | |||
5914 | $string = '。「」、・ヲァィゥェォャュョッーアイウエオカキク'; |
||
5915 | $find = 'ア'; |
||
5916 | $result = Multibyte::strstr($string, $find); |
||
5917 | $expected = 'アイウエオカキク'; |
||
5918 | $this->assertEquals($expected, $result); |
||
5919 | |||
5920 | $string = '。「」、・ヲァィゥェォャュョッーアイウエオカキク'; |
||
5921 | $find = 'ア'; |
||
5922 | $result = Multibyte::strstr($string, $find, true); |
||
5923 | $expected = '。「」、・ヲァィゥェォャュョッー'; |
||
5924 | $this->assertEquals($expected, $result); |
||
5925 | |||
5926 | $string = 'ケコサシスセソタチツテトナニヌネノハヒフヘホマミムメモヤユヨラリルレロワン゙'; |
||
5927 | $find = 'ハ'; |
||
5928 | $result = Multibyte::strstr($string, $find); |
||
5929 | $expected = 'ハヒフヘホマミムメモヤユヨラリルレロワン゙'; |
||
5930 | $this->assertEquals($expected, $result); |
||
5931 | |||
5932 | $string = 'ケコサシスセソタチツテトナニヌネノハヒフヘホマミムメモヤユヨラリルレロワン゙'; |
||
5933 | $find = 'ハ'; |
||
5934 | $result = Multibyte::strstr($string, $find, true); |
||
5935 | $expected = 'ケコサシスセソタチツテトナニヌネノ'; |
||
5936 | $this->assertEquals($expected, $result); |
||
5937 | |||
5938 | $string = 'Ĥēĺļŏ, Ŵőřļď!'; |
||
5939 | $find = 'ő'; |
||
5940 | $result = Multibyte::strstr($string, $find); |
||
5941 | $expected = 'őřļď!'; |
||
5942 | $this->assertEquals($expected, $result); |
||
5943 | |||
5944 | $string = 'Ĥēĺļŏ, Ŵőřļď!'; |
||
5945 | $find = 'ő'; |
||
5946 | $result = Multibyte::strstr($string, $find, true); |
||
5947 | $expected = 'Ĥēĺļŏ, Ŵ'; |
||
5948 | $this->assertEquals($expected, $result); |
||
5949 | |||
5950 | $string = 'Ĥēĺļŏ, Ŵőřļď!'; |
||
5951 | $find = 'ĺļ'; |
||
5952 | $result = Multibyte::strstr($string, $find, true); |
||
5953 | $expected = 'Ĥē'; |
||
5954 | $this->assertEquals($expected, $result); |
||
5955 | |||
5956 | $string = 'Hello, World!'; |
||
5957 | $find = 'o'; |
||
5958 | $result = Multibyte::strstr($string, $find); |
||
5959 | $expected = 'o, World!'; |
||
5960 | $this->assertEquals($expected, $result); |
||
5961 | |||
5962 | $string = 'Hello, World!'; |
||
5963 | $find = 'o'; |
||
5964 | $result = Multibyte::strstr($string, $find, true); |
||
5965 | $expected = 'Hell'; |
||
5966 | $this->assertEquals($expected, $result); |
||
5967 | |||
5968 | $string = 'Hello, World!'; |
||
5969 | $find = 'Wo'; |
||
5970 | $result = Multibyte::strstr($string, $find); |
||
5971 | $expected = 'World!'; |
||
5972 | $this->assertEquals($expected, $result); |
||
5973 | |||
5974 | $string = 'Hello, World!'; |
||
5975 | $find = 'Wo'; |
||
5976 | $result = Multibyte::strstr($string, $find, true); |
||
5977 | $expected = 'Hello, '; |
||
5978 | $this->assertEquals($expected, $result); |
||
5979 | |||
5980 | $string = 'Hello, World!'; |
||
5981 | $find = 'll'; |
||
5982 | $result = Multibyte::strstr($string, $find); |
||
5983 | $expected = 'llo, World!'; |
||
5984 | $this->assertEquals($expected, $result); |
||
5985 | |||
5986 | $string = 'Hello, World!'; |
||
5987 | $find = 'll'; |
||
5988 | $result = Multibyte::strstr($string, $find, true); |
||
5989 | $expected = 'He'; |
||
5990 | $this->assertEquals($expected, $result); |
||
5991 | |||
5992 | $string = 'Hello, World!'; |
||
5993 | $find = 'rld'; |
||
5994 | $result = Multibyte::strstr($string, $find); |
||
5995 | $expected = 'rld!'; |
||
5996 | $this->assertEquals($expected, $result); |
||
5997 | |||
5998 | $string = 'Hello, World!'; |
||
5999 | $find = 'rld'; |
||
6000 | $result = Multibyte::strstr($string, $find, true); |
||
6001 | $expected = 'Hello, Wo'; |
||
6002 | $this->assertEquals($expected, $result); |
||
6003 | |||
6004 | $string = 'čini'; |
||
6005 | $find = 'n'; |
||
6006 | $result = Multibyte::strstr($string, $find); |
||
6007 | $expected = 'ni'; |
||
6008 | $this->assertEquals($expected, $result); |
||
6009 | |||
6010 | $string = 'čini'; |
||
6011 | $find = 'n'; |
||
6012 | $result = Multibyte::strstr($string, $find, true); |
||
6013 | $expected = 'či'; |
||
6014 | $this->assertEquals($expected, $result); |
||
6015 | |||
6016 | $string = 'moći'; |
||
6017 | $find = 'ć'; |
||
6018 | $result = Multibyte::strstr($string, $find); |
||
6019 | $expected = 'ći'; |
||
6020 | $this->assertEquals($expected, $result); |
||
6021 | |||
6022 | $string = 'moći'; |
||
6023 | $find = 'ć'; |
||
6024 | $result = Multibyte::strstr($string, $find, true); |
||
6025 | $expected = 'mo'; |
||
6026 | $this->assertEquals($expected, $result); |
||
6027 | |||
6028 | $string = 'državni'; |
||
6029 | $find = 'ž'; |
||
6030 | $result = Multibyte::strstr($string, $find); |
||
6031 | $expected = 'žavni'; |
||
6032 | $this->assertEquals($expected, $result); |
||
6033 | |||
6034 | $string = 'državni'; |
||
6035 | $find = 'ž'; |
||
6036 | $result = Multibyte::strstr($string, $find, true); |
||
6037 | $expected = 'dr'; |
||
6038 | $this->assertEquals($expected, $result); |
||
6039 | |||
6040 | $string = '把百度设为首页'; |
||
6041 | $find = '设'; |
||
6042 | $result = Multibyte::strstr($string, $find); |
||
6043 | $expected = '设为首页'; |
||
6044 | $this->assertEquals($expected, $result); |
||
6045 | |||
6046 | $string = '把百度设为首页'; |
||
6047 | $find = '设'; |
||
6048 | $result = Multibyte::strstr($string, $find, true); |
||
6049 | $expected = '把百度'; |
||
6050 | $this->assertEquals($expected, $result); |
||
6051 | |||
6052 | $string = '一二三周永龍'; |
||
6053 | $find = '周'; |
||
6054 | $result = Multibyte::strstr($string, $find); |
||
6055 | $expected = '周永龍'; |
||
6056 | $this->assertEquals($expected, $result); |
||
6057 | |||
6058 | $string = '一二三周永龍'; |
||
6059 | $find = '周'; |
||
6060 | $result = Multibyte::strstr($string, $find, true); |
||
6061 | $expected = '一二三'; |
||
6062 | $this->assertEquals($expected, $result); |
||
6063 | |||
6064 | $string = '一二三周永龍'; |
||
6065 | $find = '二周'; |
||
6066 | $result = Multibyte::strstr($string, $find); |
||
6067 | $expected = false; |
||
6068 | $this->assertEquals($expected, $result); |
||
6069 | } |
||
6070 | |||
6071 | /**
|
||
6072 | * testUsingMbStrtolower method
|
||
6073 | *
|
||
6074 | * @return void
|
||
6075 | */
|
||
6076 | public function testUsingMbStrtolower() { |
||
6077 | $string = '!"#$%&\'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`ABCDEFGHIJKLMNOPQRSTUVWXYZ{|}~'; |
||
6078 | $result = mb_strtolower($string); |
||
6079 | $expected = '!"#$%&\'()*+,-./0123456789:;<=>?@abcdefghijklmnopqrstuvwxyz[\]^_`abcdefghijklmnopqrstuvwxyz{|}~'; |
||
6080 | $this->assertEquals($expected, $result); |
||
6081 | |||
6082 | $string = '!"#$%&\'()*+,-./0123456789:;<=>?@'; |
||
6083 | $result = mb_strtolower($string); |
||
6084 | $expected = '!"#$%&\'()*+,-./0123456789:;<=>?@'; |
||
6085 | $this->assertEquals($expected, $result); |
||
6086 | |||
6087 | $string = 'À'; |
||
6088 | $result = mb_strtolower($string); |
||
6089 | $expected = 'à'; |
||
6090 | $this->assertEquals($expected, $result); |
||
6091 | |||
6092 | $string = 'Á'; |
||
6093 | $result = mb_strtolower($string); |
||
6094 | $expected = 'á'; |
||
6095 | $this->assertEquals($expected, $result); |
||
6096 | |||
6097 | $string = 'Â'; |
||
6098 | $result = mb_strtolower($string); |
||
6099 | $expected = 'â'; |
||
6100 | $this->assertEquals($expected, $result); |
||
6101 | |||
6102 | $string = 'Ã'; |
||
6103 | $result = mb_strtolower($string); |
||
6104 | $expected = 'ã'; |
||
6105 | $this->assertEquals($expected, $result); |
||
6106 | |||
6107 | $string = 'Ä'; |
||
6108 | $result = mb_strtolower($string); |
||
6109 | $expected = 'ä'; |
||
6110 | $this->assertEquals($expected, $result); |
||
6111 | |||
6112 | $string = 'Å'; |
||
6113 | $result = mb_strtolower($string); |
||
6114 | $expected = 'å'; |
||
6115 | $this->assertEquals($expected, $result); |
||
6116 | |||
6117 | $string = 'Æ'; |
||
6118 | $result = mb_strtolower($string); |
||
6119 | $expected = 'æ'; |
||
6120 | $this->assertEquals($expected, $result); |
||
6121 | |||
6122 | $string = 'Ç'; |
||
6123 | $result = mb_strtolower($string); |
||
6124 | $expected = 'ç'; |
||
6125 | $this->assertEquals($expected, $result); |
||
6126 | |||
6127 | $string = 'È'; |
||
6128 | $result = mb_strtolower($string); |
||
6129 | $expected = 'è'; |
||
6130 | $this->assertEquals($expected, $result); |
||
6131 | |||
6132 | $string = 'É'; |
||
6133 | $result = mb_strtolower($string); |
||
6134 | $expected = 'é'; |
||
6135 | $this->assertEquals($expected, $result); |
||
6136 | |||
6137 | $string = 'Ê'; |
||
6138 | $result = mb_strtolower($string); |
||
6139 | $expected = 'ê'; |
||
6140 | $this->assertEquals($expected, $result); |
||
6141 | |||
6142 | $string = 'Ë'; |
||
6143 | $result = mb_strtolower($string); |
||
6144 | $expected = 'ë'; |
||
6145 | $this->assertEquals($expected, $result); |
||
6146 | |||
6147 | $string = 'Ì'; |
||
6148 | $result = mb_strtolower($string); |
||
6149 | $expected = 'ì'; |
||
6150 | $this->assertEquals($expected, $result); |
||
6151 | |||
6152 | $string = 'Í'; |
||
6153 | $result = mb_strtolower($string); |
||
6154 | $expected = 'í'; |
||
6155 | $this->assertEquals($expected, $result); |
||
6156 | |||
6157 | $string = 'Î'; |
||
6158 | $result = mb_strtolower($string); |
||
6159 | $expected = 'î'; |
||
6160 | $this->assertEquals($expected, $result); |
||
6161 | |||
6162 | $string = 'Ï'; |
||
6163 | $result = mb_strtolower($string); |
||
6164 | $expected = 'ï'; |
||
6165 | $this->assertEquals($expected, $result); |
||
6166 | |||
6167 | $string = 'Ð'; |
||
6168 | $result = mb_strtolower($string); |
||
6169 | $expected = 'ð'; |
||
6170 | $this->assertEquals($expected, $result); |
||
6171 | |||
6172 | $string = 'Ñ'; |
||
6173 | $result = mb_strtolower($string); |
||
6174 | $expected = 'ñ'; |
||
6175 | $this->assertEquals($expected, $result); |
||
6176 | |||
6177 | $string = 'Ò'; |
||
6178 | $result = mb_strtolower($string); |
||
6179 | $expected = 'ò'; |
||
6180 | $this->assertEquals($expected, $result); |
||
6181 | |||
6182 | $string = 'Ó'; |
||
6183 | $result = mb_strtolower($string); |
||
6184 | $expected = 'ó'; |
||
6185 | $this->assertEquals($expected, $result); |
||
6186 | |||
6187 | $string = 'Ô'; |
||
6188 | $result = mb_strtolower($string); |
||
6189 | $expected = 'ô'; |
||
6190 | $this->assertEquals($expected, $result); |
||
6191 | |||
6192 | $string = 'Õ'; |
||
6193 | $result = mb_strtolower($string); |
||
6194 | $expected = 'õ'; |
||
6195 | $this->assertEquals($expected, $result); |
||
6196 | |||
6197 | $string = 'Ö'; |
||
6198 | $result = mb_strtolower($string); |
||
6199 | $expected = 'ö'; |
||
6200 | $this->assertEquals($expected, $result); |
||
6201 | |||
6202 | $string = 'Ø'; |
||
6203 | $result = mb_strtolower($string); |
||
6204 | $expected = 'ø'; |
||
6205 | $this->assertEquals($expected, $result); |
||
6206 | |||
6207 | $string = 'Ù'; |
||
6208 | $result = mb_strtolower($string); |
||
6209 | $expected = 'ù'; |
||
6210 | $this->assertEquals($expected, $result); |
||
6211 | |||
6212 | $string = 'Ú'; |
||
6213 | $result = mb_strtolower($string); |
||
6214 | $expected = 'ú'; |
||
6215 | $this->assertEquals($expected, $result); |
||
6216 | |||
6217 | $string = 'Û'; |
||
6218 | $result = mb_strtolower($string); |
||
6219 | $expected = 'û'; |
||
6220 | $this->assertEquals($expected, $result); |
||
6221 | |||
6222 | $string = 'Ü'; |
||
6223 | $result = mb_strtolower($string); |
||
6224 | $expected = 'ü'; |
||
6225 | $this->assertEquals($expected, $result); |
||
6226 | |||
6227 | $string = 'Ý'; |
||
6228 | $result = mb_strtolower($string); |
||
6229 | $expected = 'ý'; |
||
6230 | $this->assertEquals($expected, $result); |
||
6231 | |||
6232 | $string = 'Þ'; |
||
6233 | $result = mb_strtolower($string); |
||
6234 | $expected = 'þ'; |
||
6235 | $this->assertEquals($expected, $result); |
||
6236 | |||
6237 | $string = 'ÀÁÂÃÄÅÆÇÈÉÊËÌÍÎÏÐÑÒÓÔÕÖØÙÚÛÜÝÞ'; |
||
6238 | $result = mb_strtolower($string); |
||
6239 | $expected = 'àáâãäåæçèéêëìíîïðñòóôõöøùúûüýþ'; |
||
6240 | $this->assertEquals($expected, $result); |
||
6241 | |||
6242 | $string = 'Ā'; |
||
6243 | $result = mb_strtolower($string); |
||
6244 | $expected = 'ā'; |
||
6245 | $this->assertEquals($expected, $result); |
||
6246 | |||
6247 | $string = 'Ă'; |
||
6248 | $result = mb_strtolower($string); |
||
6249 | $expected = 'ă'; |
||
6250 | $this->assertEquals($expected, $result); |
||
6251 | |||
6252 | $string = 'Ą'; |
||
6253 | $result = mb_strtolower($string); |
||
6254 | $expected = 'ą'; |
||
6255 | $this->assertEquals($expected, $result); |
||
6256 | |||
6257 | $string = 'Ć'; |
||
6258 | $result = mb_strtolower($string); |
||
6259 | $expected = 'ć'; |
||
6260 | $this->assertEquals($expected, $result); |
||
6261 | |||
6262 | $string = 'Ĉ'; |
||
6263 | $result = mb_strtolower($string); |
||
6264 | $expected = 'ĉ'; |
||
6265 | $this->assertEquals($expected, $result); |
||
6266 | |||
6267 | $string = 'Ċ'; |
||
6268 | $result = mb_strtolower($string); |
||
6269 | $expected = 'ċ'; |
||
6270 | $this->assertEquals($expected, $result); |
||
6271 | |||
6272 | $string = 'Č'; |
||
6273 | $result = mb_strtolower($string); |
||
6274 | $expected = 'č'; |
||
6275 | $this->assertEquals($expected, $result); |
||
6276 | |||
6277 | $string = 'Ď'; |
||
6278 | $result = mb_strtolower($string); |
||
6279 | $expected = 'ď'; |
||
6280 | $this->assertEquals($expected, $result); |
||
6281 | |||
6282 | $string = 'Đ'; |
||
6283 | $result = mb_strtolower($string); |
||
6284 | $expected = 'đ'; |
||
6285 | $this->assertEquals($expected, $result); |
||
6286 | |||
6287 | $string = 'Ē'; |
||
6288 | $result = mb_strtolower($string); |
||
6289 | $expected = 'ē'; |
||
6290 | $this->assertEquals($expected, $result); |
||
6291 | |||
6292 | $string = 'Ĕ'; |
||
6293 | $result = mb_strtolower($string); |
||
6294 | $expected = 'ĕ'; |
||
6295 | $this->assertEquals($expected, $result); |
||
6296 | |||
6297 | $string = 'Ė'; |
||
6298 | $result = mb_strtolower($string); |
||
6299 | $expected = 'ė'; |
||
6300 | $this->assertEquals($expected, $result); |
||
6301 | |||
6302 | $string = 'Ę'; |
||
6303 | $result = mb_strtolower($string); |
||
6304 | $expected = 'ę'; |
||
6305 | $this->assertEquals($expected, $result); |
||
6306 | |||
6307 | $string = 'Ě'; |
||
6308 | $result = mb_strtolower($string); |
||
6309 | $expected = 'ě'; |
||
6310 | $this->assertEquals($expected, $result); |
||
6311 | |||
6312 | $string = 'Ĝ'; |
||
6313 | $result = mb_strtolower($string); |
||
6314 | $expected = 'ĝ'; |
||
6315 | $this->assertEquals($expected, $result); |
||
6316 | |||
6317 | $string = 'Ğ'; |
||
6318 | $result = mb_strtolower($string); |
||
6319 | $expected = 'ğ'; |
||
6320 | $this->assertEquals($expected, $result); |
||
6321 | |||
6322 | $string = 'Ġ'; |
||
6323 | $result = mb_strtolower($string); |
||
6324 | $expected = 'ġ'; |
||
6325 | $this->assertEquals($expected, $result); |
||
6326 | |||
6327 | $string = 'Ģ'; |
||
6328 | $result = mb_strtolower($string); |
||
6329 | $expected = 'ģ'; |
||
6330 | $this->assertEquals($expected, $result); |
||
6331 | |||
6332 | $string = 'Ĥ'; |
||
6333 | $result = mb_strtolower($string); |
||
6334 | $expected = 'ĥ'; |
||
6335 | $this->assertEquals($expected, $result); |
||
6336 | |||
6337 | $string = 'Ħ'; |
||
6338 | $result = mb_strtolower($string); |
||
6339 | $expected = 'ħ'; |
||
6340 | $this->assertEquals($expected, $result); |
||
6341 | |||
6342 | $string = 'Ĩ'; |
||
6343 | $result = mb_strtolower($string); |
||
6344 | $expected = 'ĩ'; |
||
6345 | $this->assertEquals($expected, $result); |
||
6346 | |||
6347 | $string = 'Ī'; |
||
6348 | $result = mb_strtolower($string); |
||
6349 | $expected = 'ī'; |
||
6350 | $this->assertEquals($expected, $result); |
||
6351 | |||
6352 | $string = 'Ĭ'; |
||
6353 | $result = mb_strtolower($string); |
||
6354 | $expected = 'ĭ'; |
||
6355 | $this->assertEquals($expected, $result); |
||
6356 | |||
6357 | $string = 'Į'; |
||
6358 | $result = mb_strtolower($string); |
||
6359 | $expected = 'į'; |
||
6360 | $this->assertEquals($expected, $result); |
||
6361 | |||
6362 | $string = 'IJ'; |
||
6363 | $result = mb_strtolower($string); |
||
6364 | $expected = 'ij'; |
||
6365 | $this->assertEquals($expected, $result); |
||
6366 | |||
6367 | $string = 'Ĵ'; |
||
6368 | $result = mb_strtolower($string); |
||
6369 | $expected = 'ĵ'; |
||
6370 | $this->assertEquals($expected, $result); |
||
6371 | |||
6372 | $string = 'Ķ'; |
||
6373 | $result = mb_strtolower($string); |
||
6374 | $expected = 'ķ'; |
||
6375 | $this->assertEquals($expected, $result); |
||
6376 | |||
6377 | $string = 'Ĺ'; |
||
6378 | $result = mb_strtolower($string); |
||
6379 | $expected = 'ĺ'; |
||
6380 | $this->assertEquals($expected, $result); |
||
6381 | |||
6382 | $string = 'Ļ'; |
||
6383 | $result = mb_strtolower($string); |
||
6384 | $expected = 'ļ'; |
||
6385 | $this->assertEquals($expected, $result); |
||
6386 | |||
6387 | $string = 'Ľ'; |
||
6388 | $result = mb_strtolower($string); |
||
6389 | $expected = 'ľ'; |
||
6390 | $this->assertEquals($expected, $result); |
||
6391 | |||
6392 | $string = 'Ŀ'; |
||
6393 | $result = mb_strtolower($string); |
||
6394 | $expected = 'ŀ'; |
||
6395 | $this->assertEquals($expected, $result); |
||
6396 | |||
6397 | $string = 'Ł'; |
||
6398 | $result = mb_strtolower($string); |
||
6399 | $expected = 'ł'; |
||
6400 | $this->assertEquals($expected, $result); |
||
6401 | |||
6402 | $string = 'Ń'; |
||
6403 | $result = mb_strtolower($string); |
||
6404 | $expected = 'ń'; |
||
6405 | $this->assertEquals($expected, $result); |
||
6406 | |||
6407 | $string = 'Ņ'; |
||
6408 | $result = mb_strtolower($string); |
||
6409 | $expected = 'ņ'; |
||
6410 | $this->assertEquals($expected, $result); |
||
6411 | |||
6412 | $string = 'Ň'; |
||
6413 | $result = mb_strtolower($string); |
||
6414 | $expected = 'ň'; |
||
6415 | $this->assertEquals($expected, $result); |
||
6416 | |||
6417 | $string = 'Ŋ'; |
||
6418 | $result = mb_strtolower($string); |
||
6419 | $expected = 'ŋ'; |
||
6420 | $this->assertEquals($expected, $result); |
||
6421 | |||
6422 | $string = 'Ō'; |
||
6423 | $result = mb_strtolower($string); |
||
6424 | $expected = 'ō'; |
||
6425 | $this->assertEquals($expected, $result); |
||
6426 | |||
6427 | $string = 'Ŏ'; |
||
6428 | $result = mb_strtolower($string); |
||
6429 | $expected = 'ŏ'; |
||
6430 | $this->assertEquals($expected, $result); |
||
6431 | |||
6432 | $string = 'Ő'; |
||
6433 | $result = mb_strtolower($string); |
||
6434 | $expected = 'ő'; |
||
6435 | $this->assertEquals($expected, $result); |
||
6436 | |||
6437 | $string = 'Œ'; |
||
6438 | $result = mb_strtolower($string); |
||
6439 | $expected = 'œ'; |
||
6440 | $this->assertEquals($expected, $result); |
||
6441 | |||
6442 | $string = 'Ŕ'; |
||
6443 | $result = mb_strtolower($string); |
||
6444 | $expected = 'ŕ'; |
||
6445 | $this->assertEquals($expected, $result); |
||
6446 | |||
6447 | $string = 'Ŗ'; |
||
6448 | $result = mb_strtolower($string); |
||
6449 | $expected = 'ŗ'; |
||
6450 | $this->assertEquals($expected, $result); |
||
6451 | |||
6452 | $string = 'Ř'; |
||
6453 | $result = mb_strtolower($string); |
||
6454 | $expected = 'ř'; |
||
6455 | $this->assertEquals($expected, $result); |
||
6456 | |||
6457 | $string = 'Ś'; |
||
6458 | $result = mb_strtolower($string); |
||
6459 | $expected = 'ś'; |
||
6460 | $this->assertEquals($expected, $result); |
||
6461 | |||
6462 | $string = 'Ŝ'; |
||
6463 | $result = mb_strtolower($string); |
||
6464 | $expected = 'ŝ'; |
||
6465 | $this->assertEquals($expected, $result); |
||
6466 | |||
6467 | $string = 'Ş'; |
||
6468 | $result = mb_strtolower($string); |
||
6469 | $expected = 'ş'; |
||
6470 | $this->assertEquals($expected, $result); |
||
6471 | |||
6472 | $string = 'Š'; |
||
6473 | $result = mb_strtolower($string); |
||
6474 | $expected = 'š'; |
||
6475 | $this->assertEquals($expected, $result); |
||
6476 | |||
6477 | $string = 'Ţ'; |
||
6478 | $result = mb_strtolower($string); |
||
6479 | $expected = 'ţ'; |
||
6480 | $this->assertEquals($expected, $result); |
||
6481 | |||
6482 | $string = 'Ť'; |
||
6483 | $result = mb_strtolower($string); |
||
6484 | $expected = 'ť'; |
||
6485 | $this->assertEquals($expected, $result); |
||
6486 | |||
6487 | $string = 'Ŧ'; |
||
6488 | $result = mb_strtolower($string); |
||
6489 | $expected = 'ŧ'; |
||
6490 | $this->assertEquals($expected, $result); |
||
6491 | |||
6492 | $string = 'Ũ'; |
||
6493 | $result = mb_strtolower($string); |
||
6494 | $expected = 'ũ'; |
||
6495 | $this->assertEquals($expected, $result); |
||
6496 | |||
6497 | $string = 'Ū'; |
||
6498 | $result = mb_strtolower($string); |
||
6499 | $expected = 'ū'; |
||
6500 | $this->assertEquals($expected, $result); |
||
6501 | |||
6502 | $string = 'Ŭ'; |
||
6503 | $result = mb_strtolower($string); |
||
6504 | $expected = 'ŭ'; |
||
6505 | $this->assertEquals($expected, $result); |
||
6506 | |||
6507 | $string = 'Ů'; |
||
6508 | $result = mb_strtolower($string); |
||
6509 | $expected = 'ů'; |
||
6510 | $this->assertEquals($expected, $result); |
||
6511 | |||
6512 | $string = 'Ű'; |
||
6513 | $result = mb_strtolower($string); |
||
6514 | $expected = 'ű'; |
||
6515 | $this->assertEquals($expected, $result); |
||
6516 | |||
6517 | $string = 'Ų'; |
||
6518 | $result = mb_strtolower($string); |
||
6519 | $expected = 'ų'; |
||
6520 | $this->assertEquals($expected, $result); |
||
6521 | |||
6522 | $string = 'Ŵ'; |
||
6523 | $result = mb_strtolower($string); |
||
6524 | $expected = 'ŵ'; |
||
6525 | $this->assertEquals($expected, $result); |
||
6526 | |||
6527 | $string = 'Ŷ'; |
||
6528 | $result = mb_strtolower($string); |
||
6529 | $expected = 'ŷ'; |
||
6530 | $this->assertEquals($expected, $result); |
||
6531 | |||
6532 | $string = 'Ź'; |
||
6533 | $result = mb_strtolower($string); |
||
6534 | $expected = 'ź'; |
||
6535 | $this->assertEquals($expected, $result); |
||
6536 | |||
6537 | $string = 'Ż'; |
||
6538 | $result = mb_strtolower($string); |
||
6539 | $expected = 'ż'; |
||
6540 | $this->assertEquals($expected, $result); |
||
6541 | |||
6542 | $string = 'Ž'; |
||
6543 | $result = mb_strtolower($string); |
||
6544 | $expected = 'ž'; |
||
6545 | $this->assertEquals($expected, $result); |
||
6546 | |||
6547 | $string = 'ĀĂĄĆĈĊČĎĐĒĔĖĘĚĜĞĠĢĤĦĨĪĬĮIJĴĶĹĻĽĿŁŃŅŇŊŌŎŐŒŔŖŘŚŜŞŠŢŤŦŨŪŬŮŰŲŴŶŹŻŽ'; |
||
6548 | $result = mb_strtolower($string); |
||
6549 | $expected = 'āăąćĉċčďđēĕėęěĝğġģĥħĩīĭįijĵķĺļľŀłńņňŋōŏőœŕŗřśŝşšţťŧũūŭůűųŵŷźżž'; |
||
6550 | $this->assertEquals($expected, $result); |
||
6551 | |||
6552 | $string = 'ĤĒĹĻŎ, ŴŐŘĻĎ!'; |
||
6553 | $result = mb_strtolower($string); |
||
6554 | $expected = 'ĥēĺļŏ, ŵőřļď!'; |
||
6555 | $this->assertEquals($expected, $result); |
||
6556 | |||
6557 | $string = 'ĥēĺļŏ, ŵőřļď!'; |
||
6558 | $result = mb_strtolower($string); |
||
6559 | $expected = 'ĥēĺļŏ, ŵőřļď!'; |
||
6560 | $this->assertEquals($expected, $result); |
||
6561 | |||
6562 | $string = 'ἈΙ'; |
||
6563 | $result = mb_strtolower($string); |
||
6564 | $expected = 'ἀι'; |
||
6565 | $this->assertEquals($expected, $result); |
||
6566 | |||
6567 | $string = 'fffiflffifflſtstﬓﬔﬕﬖﬗ'; |
||
6568 | $result = mb_strtolower($string); |
||
6569 | $expected = 'fffiflffifflſtstﬓﬔﬕﬖﬗ'; |
||
6570 | $this->assertEquals($expected, $result); |
||
6571 | } |
||
6572 | |||
6573 | /**
|
||
6574 | * testMultibyteStrtolower method
|
||
6575 | *
|
||
6576 | * @return void
|
||
6577 | */
|
||
6578 | public function testMultibyteStrtolower() { |
||
6579 | $string = '!"#$%&\'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`ABCDEFGHIJKLMNOPQRSTUVWXYZ{|}~'; |
||
6580 | $result = Multibyte::strtolower($string); |
||
6581 | $expected = '!"#$%&\'()*+,-./0123456789:;<=>?@abcdefghijklmnopqrstuvwxyz[\]^_`abcdefghijklmnopqrstuvwxyz{|}~'; |
||
6582 | $this->assertEquals($expected, $result); |
||
6583 | |||
6584 | $string = '!"#$%&\'()*+,-./0123456789:;<=>?@'; |
||
6585 | $result = Multibyte::strtolower($string); |
||
6586 | $expected = '!"#$%&\'()*+,-./0123456789:;<=>?@'; |
||
6587 | $this->assertEquals($expected, $result); |
||
6588 | |||
6589 | $string = 'À'; |
||
6590 | $result = Multibyte::strtolower($string); |
||
6591 | $expected = 'à'; |
||
6592 | $this->assertEquals($expected, $result); |
||
6593 | |||
6594 | $string = 'Á'; |
||
6595 | $result = Multibyte::strtolower($string); |
||
6596 | $expected = 'á'; |
||
6597 | $this->assertEquals($expected, $result); |
||
6598 | |||
6599 | $string = 'Â'; |
||
6600 | $result = Multibyte::strtolower($string); |
||
6601 | $expected = 'â'; |
||
6602 | $this->assertEquals($expected, $result); |
||
6603 | |||
6604 | $string = 'Ã'; |
||
6605 | $result = Multibyte::strtolower($string); |
||
6606 | $expected = 'ã'; |
||
6607 | $this->assertEquals($expected, $result); |
||
6608 | |||
6609 | $string = 'Ä'; |
||
6610 | $result = Multibyte::strtolower($string); |
||
6611 | $expected = 'ä'; |
||
6612 | $this->assertEquals($expected, $result); |
||
6613 | |||
6614 | $string = 'Å'; |
||
6615 | $result = Multibyte::strtolower($string); |
||
6616 | $expected = 'å'; |
||
6617 | $this->assertEquals($expected, $result); |
||
6618 | |||
6619 | $string = 'Æ'; |
||
6620 | $result = Multibyte::strtolower($string); |
||
6621 | $expected = 'æ'; |
||
6622 | $this->assertEquals($expected, $result); |
||
6623 | |||
6624 | $string = 'Ç'; |
||
6625 | $result = Multibyte::strtolower($string); |
||
6626 | $expected = 'ç'; |
||
6627 | $this->assertEquals($expected, $result); |
||
6628 | |||
6629 | $string = 'È'; |
||
6630 | $result = Multibyte::strtolower($string); |
||
6631 | $expected = 'è'; |
||
6632 | $this->assertEquals($expected, $result); |
||
6633 | |||
6634 | $string = 'É'; |
||
6635 | $result = Multibyte::strtolower($string); |
||
6636 | $expected = 'é'; |
||
6637 | $this->assertEquals($expected, $result); |
||
6638 | |||
6639 | $string = 'Ê'; |
||
6640 | $result = Multibyte::strtolower($string); |
||
6641 | $expected = 'ê'; |
||
6642 | $this->assertEquals($expected, $result); |
||
6643 | |||
6644 | $string = 'Ë'; |
||
6645 | $result = Multibyte::strtolower($string); |
||
6646 | $expected = 'ë'; |
||
6647 | $this->assertEquals($expected, $result); |
||
6648 | |||
6649 | $string = 'Ì'; |
||
6650 | $result = Multibyte::strtolower($string); |
||
6651 | $expected = 'ì'; |
||
6652 | $this->assertEquals($expected, $result); |
||
6653 | |||
6654 | $string = 'Í'; |
||
6655 | $result = Multibyte::strtolower($string); |
||
6656 | $expected = 'í'; |
||
6657 | $this->assertEquals($expected, $result); |
||
6658 | |||
6659 | $string = 'Î'; |
||
6660 | $result = Multibyte::strtolower($string); |
||
6661 | $expected = 'î'; |
||
6662 | $this->assertEquals($expected, $result); |
||
6663 | |||
6664 | $string = 'Ï'; |
||
6665 | $result = Multibyte::strtolower($string); |
||
6666 | $expected = 'ï'; |
||
6667 | $this->assertEquals($expected, $result); |
||
6668 | |||
6669 | $string = 'Ð'; |
||
6670 | $result = Multibyte::strtolower($string); |
||
6671 | $expected = 'ð'; |
||
6672 | $this->assertEquals($expected, $result); |
||
6673 | |||
6674 | $string = 'Ñ'; |
||
6675 | $result = Multibyte::strtolower($string); |
||
6676 | $expected = 'ñ'; |
||
6677 | $this->assertEquals($expected, $result); |
||
6678 | |||
6679 | $string = 'Ò'; |
||
6680 | $result = Multibyte::strtolower($string); |
||
6681 | $expected = 'ò'; |
||
6682 | $this->assertEquals($expected, $result); |
||
6683 | |||
6684 | $string = 'Ó'; |
||
6685 | $result = Multibyte::strtolower($string); |
||
6686 | $expected = 'ó'; |
||
6687 | $this->assertEquals($expected, $result); |
||
6688 | |||
6689 | $string = 'Ô'; |
||
6690 | $result = Multibyte::strtolower($string); |
||
6691 | $expected = 'ô'; |
||
6692 | $this->assertEquals($expected, $result); |
||
6693 | |||
6694 | $string = 'Õ'; |
||
6695 | $result = Multibyte::strtolower($string); |
||
6696 | $expected = 'õ'; |
||
6697 | $this->assertEquals($expected, $result); |
||
6698 | |||
6699 | $string = 'Ö'; |
||
6700 | $result = Multibyte::strtolower($string); |
||
6701 | $expected = 'ö'; |
||
6702 | $this->assertEquals($expected, $result); |
||
6703 | |||
6704 | $string = 'Ø'; |
||
6705 | $result = Multibyte::strtolower($string); |
||
6706 | $expected = 'ø'; |
||
6707 | $this->assertEquals($expected, $result); |
||
6708 | |||
6709 | $string = 'Ù'; |
||
6710 | $result = Multibyte::strtolower($string); |
||
6711 | $expected = 'ù'; |
||
6712 | $this->assertEquals($expected, $result); |
||
6713 | |||
6714 | $string = 'Ú'; |
||
6715 | $result = Multibyte::strtolower($string); |
||
6716 | $expected = 'ú'; |
||
6717 | $this->assertEquals($expected, $result); |
||
6718 | |||
6719 | $string = 'Û'; |
||
6720 | $result = Multibyte::strtolower($string); |
||
6721 | $expected = 'û'; |
||
6722 | $this->assertEquals($expected, $result); |
||
6723 | |||
6724 | $string = 'Ü'; |
||
6725 | $result = Multibyte::strtolower($string); |
||
6726 | $expected = 'ü'; |
||
6727 | $this->assertEquals($expected, $result); |
||
6728 | |||
6729 | $string = 'Ý'; |
||
6730 | $result = Multibyte::strtolower($string); |
||
6731 | $expected = 'ý'; |
||
6732 | $this->assertEquals($expected, $result); |
||
6733 | |||
6734 | $string = 'Þ'; |
||
6735 | $result = Multibyte::strtolower($string); |
||
6736 | $expected = 'þ'; |
||
6737 | $this->assertEquals($expected, $result); |
||
6738 | |||
6739 | $string = 'ÀÁÂÃÄÅÆÇÈÉÊËÌÍÎÏÐÑÒÓÔÕÖØÙÚÛÜÝÞ'; |
||
6740 | $result = Multibyte::strtolower($string); |
||
6741 | $expected = 'àáâãäåæçèéêëìíîïðñòóôõöøùúûüýþ'; |
||
6742 | $this->assertEquals($expected, $result); |
||
6743 | |||
6744 | $string = 'Ā'; |
||
6745 | $result = Multibyte::strtolower($string); |
||
6746 | $expected = 'ā'; |
||
6747 | $this->assertEquals($expected, $result); |
||
6748 | |||
6749 | $string = 'Ă'; |
||
6750 | $result = Multibyte::strtolower($string); |
||
6751 | $expected = 'ă'; |
||
6752 | $this->assertEquals($expected, $result); |
||
6753 | |||
6754 | $string = 'Ą'; |
||
6755 | $result = Multibyte::strtolower($string); |
||
6756 | $expected = 'ą'; |
||
6757 | $this->assertEquals($expected, $result); |
||
6758 | |||
6759 | $string = 'Ć'; |
||
6760 | $result = Multibyte::strtolower($string); |
||
6761 | $expected = 'ć'; |
||
6762 | $this->assertEquals($expected, $result); |
||
6763 | |||
6764 | $string = 'Ĉ'; |
||
6765 | $result = Multibyte::strtolower($string); |
||
6766 | $expected = 'ĉ'; |
||
6767 | $this->assertEquals($expected, $result); |
||
6768 | |||
6769 | $string = 'Ċ'; |
||
6770 | $result = Multibyte::strtolower($string); |
||
6771 | $expected = 'ċ'; |
||
6772 | $this->assertEquals($expected, $result); |
||
6773 | |||
6774 | $string = 'Č'; |
||
6775 | $result = Multibyte::strtolower($string); |
||
6776 | $expected = 'č'; |
||
6777 | $this->assertEquals($expected, $result); |
||
6778 | |||
6779 | $string = 'Ď'; |
||
6780 | $result = Multibyte::strtolower($string); |
||
6781 | $expected = 'ď'; |
||
6782 | $this->assertEquals($expected, $result); |
||
6783 | |||
6784 | $string = 'Đ'; |
||
6785 | $result = Multibyte::strtolower($string); |
||
6786 | $expected = 'đ'; |
||
6787 | $this->assertEquals($expected, $result); |
||
6788 | |||
6789 | $string = 'Ē'; |
||
6790 | $result = Multibyte::strtolower($string); |
||
6791 | $expected = 'ē'; |
||
6792 | $this->assertEquals($expected, $result); |
||
6793 | |||
6794 | $string = 'Ĕ'; |
||
6795 | $result = Multibyte::strtolower($string); |
||
6796 | $expected = 'ĕ'; |
||
6797 | $this->assertEquals($expected, $result); |
||
6798 | |||
6799 | $string = 'Ė'; |
||
6800 | $result = Multibyte::strtolower($string); |
||
6801 | $expected = 'ė'; |
||
6802 | $this->assertEquals($expected, $result); |
||
6803 | |||
6804 | $string = 'Ę'; |
||
6805 | $result = Multibyte::strtolower($string); |
||
6806 | $expected = 'ę'; |
||
6807 | $this->assertEquals($expected, $result); |
||
6808 | |||
6809 | $string = 'Ě'; |
||
6810 | $result = Multibyte::strtolower($string); |
||
6811 | $expected = 'ě'; |
||
6812 | $this->assertEquals($expected, $result); |
||
6813 | |||
6814 | $string = 'Ĝ'; |
||
6815 | $result = Multibyte::strtolower($string); |
||
6816 | $expected = 'ĝ'; |
||
6817 | $this->assertEquals($expected, $result); |
||
6818 | |||
6819 | $string = 'Ğ'; |
||
6820 | $result = Multibyte::strtolower($string); |
||
6821 | $expected = 'ğ'; |
||
6822 | $this->assertEquals($expected, $result); |
||
6823 | |||
6824 | $string = 'Ġ'; |
||
6825 | $result = Multibyte::strtolower($string); |
||
6826 | $expected = 'ġ'; |
||
6827 | $this->assertEquals($expected, $result); |
||
6828 | |||
6829 | $string = 'Ģ'; |
||
6830 | $result = Multibyte::strtolower($string); |
||
6831 | $expected = 'ģ'; |
||
6832 | $this->assertEquals($expected, $result); |
||
6833 | |||
6834 | $string = 'Ĥ'; |
||
6835 | $result = Multibyte::strtolower($string); |
||
6836 | $expected = 'ĥ'; |
||
6837 | $this->assertEquals($expected, $result); |
||
6838 | |||
6839 | $string = 'Ħ'; |
||
6840 | $result = Multibyte::strtolower($string); |
||
6841 | $expected = 'ħ'; |
||
6842 | $this->assertEquals($expected, $result); |
||
6843 | |||
6844 | $string = 'Ĩ'; |
||
6845 | $result = Multibyte::strtolower($string); |
||
6846 | $expected = 'ĩ'; |
||
6847 | $this->assertEquals($expected, $result); |
||
6848 | |||
6849 | $string = 'Ī'; |
||
6850 | $result = Multibyte::strtolower($string); |
||
6851 | $expected = 'ī'; |
||
6852 | $this->assertEquals($expected, $result); |
||
6853 | |||
6854 | $string = 'Ĭ'; |
||
6855 | $result = Multibyte::strtolower($string); |
||
6856 | $expected = 'ĭ'; |
||
6857 | $this->assertEquals($expected, $result); |
||
6858 | |||
6859 | $string = 'Į'; |
||
6860 | $result = Multibyte::strtolower($string); |
||
6861 | $expected = 'į'; |
||
6862 | $this->assertEquals($expected, $result); |
||
6863 | |||
6864 | $string = 'IJ'; |
||
6865 | $result = Multibyte::strtolower($string); |
||
6866 | $expected = 'ij'; |
||
6867 | $this->assertEquals($expected, $result); |
||
6868 | |||
6869 | $string = 'Ĵ'; |
||
6870 | $result = Multibyte::strtolower($string); |
||
6871 | $expected = 'ĵ'; |
||
6872 | $this->assertEquals($expected, $result); |
||
6873 | |||
6874 | $string = 'Ķ'; |
||
6875 | $result = Multibyte::strtolower($string); |
||
6876 | $expected = 'ķ'; |
||
6877 | $this->assertEquals($expected, $result); |
||
6878 | |||
6879 | $string = 'Ĺ'; |
||
6880 | $result = Multibyte::strtolower($string); |
||
6881 | $expected = 'ĺ'; |
||
6882 | $this->assertEquals($expected, $result); |
||
6883 | |||
6884 | $string = 'Ļ'; |
||
6885 | $result = Multibyte::strtolower($string); |
||
6886 | $expected = 'ļ'; |
||
6887 | $this->assertEquals($expected, $result); |
||
6888 | |||
6889 | $string = 'Ľ'; |
||
6890 | $result = Multibyte::strtolower($string); |
||
6891 | $expected = 'ľ'; |
||
6892 | $this->assertEquals($expected, $result); |
||
6893 | |||
6894 | $string = 'Ŀ'; |
||
6895 | $result = Multibyte::strtolower($string); |
||
6896 | $expected = 'ŀ'; |
||
6897 | $this->assertEquals($expected, $result); |
||
6898 | |||
6899 | $string = 'Ł'; |
||
6900 | $result = Multibyte::strtolower($string); |
||
6901 | $expected = 'ł'; |
||
6902 | $this->assertEquals($expected, $result); |
||
6903 | |||
6904 | $string = 'Ń'; |
||
6905 | $result = Multibyte::strtolower($string); |
||
6906 | $expected = 'ń'; |
||
6907 | $this->assertEquals($expected, $result); |
||
6908 | |||
6909 | $string = 'Ņ'; |
||
6910 | $result = Multibyte::strtolower($string); |
||
6911 | $expected = 'ņ'; |
||
6912 | $this->assertEquals($expected, $result); |
||
6913 | |||
6914 | $string = 'Ň'; |
||
6915 | $result = Multibyte::strtolower($string); |
||
6916 | $expected = 'ň'; |
||
6917 | $this->assertEquals($expected, $result); |
||
6918 | |||
6919 | $string = 'Ŋ'; |
||
6920 | $result = Multibyte::strtolower($string); |
||
6921 | $expected = 'ŋ'; |
||
6922 | $this->assertEquals($expected, $result); |
||
6923 | |||
6924 | $string = 'Ō'; |
||
6925 | $result = Multibyte::strtolower($string); |
||
6926 | $expected = 'ō'; |
||
6927 | $this->assertEquals($expected, $result); |
||
6928 | |||
6929 | $string = 'Ŏ'; |
||
6930 | $result = Multibyte::strtolower($string); |
||
6931 | $expected = 'ŏ'; |
||
6932 | $this->assertEquals($expected, $result); |
||
6933 | |||
6934 | $string = 'Ő'; |
||
6935 | $result = Multibyte::strtolower($string); |
||
6936 | $expected = 'ő'; |
||
6937 | $this->assertEquals($expected, $result); |
||
6938 | |||
6939 | $string = 'Œ'; |
||
6940 | $result = Multibyte::strtolower($string); |
||
6941 | $expected = 'œ'; |
||
6942 | $this->assertEquals($expected, $result); |
||
6943 | |||
6944 | $string = 'Ŕ'; |
||
6945 | $result = Multibyte::strtolower($string); |
||
6946 | $expected = 'ŕ'; |
||
6947 | $this->assertEquals($expected, $result); |
||
6948 | |||
6949 | $string = 'Ŗ'; |
||
6950 | $result = Multibyte::strtolower($string); |
||
6951 | $expected = 'ŗ'; |
||
6952 | $this->assertEquals($expected, $result); |
||
6953 | |||
6954 | $string = 'Ř'; |
||
6955 | $result = Multibyte::strtolower($string); |
||
6956 | $expected = 'ř'; |
||
6957 | $this->assertEquals($expected, $result); |
||
6958 | |||
6959 | $string = 'Ś'; |
||
6960 | $result = Multibyte::strtolower($string); |
||
6961 | $expected = 'ś'; |
||
6962 | $this->assertEquals($expected, $result); |
||
6963 | |||
6964 | $string = 'Ŝ'; |
||
6965 | $result = Multibyte::strtolower($string); |
||
6966 | $expected = 'ŝ'; |
||
6967 | $this->assertEquals($expected, $result); |
||
6968 | |||
6969 | $string = 'Ş'; |
||
6970 | $result = Multibyte::strtolower($string); |
||
6971 | $expected = 'ş'; |
||
6972 | $this->assertEquals($expected, $result); |
||
6973 | |||
6974 | $string = 'Š'; |
||
6975 | $result = Multibyte::strtolower($string); |
||
6976 | $expected = 'š'; |
||
6977 | $this->assertEquals($expected, $result); |
||
6978 | |||
6979 | $string = 'Ţ'; |
||
6980 | $result = Multibyte::strtolower($string); |
||
6981 | $expected = 'ţ'; |
||
6982 | $this->assertEquals($expected, $result); |
||
6983 | |||
6984 | $string = 'Ť'; |
||
6985 | $result = Multibyte::strtolower($string); |
||
6986 | $expected = 'ť'; |
||
6987 | $this->assertEquals($expected, $result); |
||
6988 | |||
6989 | $string = 'Ŧ'; |
||
6990 | $result = Multibyte::strtolower($string); |
||
6991 | $expected = 'ŧ'; |
||
6992 | $this->assertEquals($expected, $result); |
||
6993 | |||
6994 | $string = 'Ũ'; |
||
6995 | $result = Multibyte::strtolower($string); |
||
6996 | $expected = 'ũ'; |
||
6997 | $this->assertEquals($expected, $result); |
||
6998 | |||
6999 | $string = 'Ū'; |
||
7000 | $result = Multibyte::strtolower($string); |
||
7001 | $expected = 'ū'; |
||
7002 | $this->assertEquals($expected, $result); |
||
7003 | |||
7004 | $string = 'Ŭ'; |
||
7005 | $result = Multibyte::strtolower($string); |
||
7006 | $expected = 'ŭ'; |
||
7007 | $this->assertEquals($expected, $result); |
||
7008 | |||
7009 | $string = 'Ů'; |
||
7010 | $result = Multibyte::strtolower($string); |
||
7011 | $expected = 'ů'; |
||
7012 | $this->assertEquals($expected, $result); |
||
7013 | |||
7014 | $string = 'Ű'; |
||
7015 | $result = Multibyte::strtolower($string); |
||
7016 | $expected = 'ű'; |
||
7017 | $this->assertEquals($expected, $result); |
||
7018 | |||
7019 | $string = 'Ų'; |
||
7020 | $result = Multibyte::strtolower($string); |
||
7021 | $expected = 'ų'; |
||
7022 | $this->assertEquals($expected, $result); |
||
7023 | |||
7024 | $string = 'Ŵ'; |
||
7025 | $result = Multibyte::strtolower($string); |
||
7026 | $expected = 'ŵ'; |
||
7027 | $this->assertEquals($expected, $result); |
||
7028 | |||
7029 | $string = 'Ŷ'; |
||
7030 | $result = Multibyte::strtolower($string); |
||
7031 | $expected = 'ŷ'; |
||
7032 | $this->assertEquals($expected, $result); |
||
7033 | |||
7034 | $string = 'Ź'; |
||
7035 | $result = Multibyte::strtolower($string); |
||
7036 | $expected = 'ź'; |
||
7037 | $this->assertEquals($expected, $result); |
||
7038 | |||
7039 | $string = 'Ż'; |
||
7040 | $result = Multibyte::strtolower($string); |
||
7041 | $expected = 'ż'; |
||
7042 | $this->assertEquals($expected, $result); |
||
7043 | |||
7044 | $string = 'Ž'; |
||
7045 | $result = Multibyte::strtolower($string); |
||
7046 | $expected = 'ž'; |
||
7047 | $this->assertEquals($expected, $result); |
||
7048 | |||
7049 | $string = 'ĀĂĄĆĈĊČĎĐĒĔĖĘĚĜĞĠĢĤĦĨĪĬĮIJĴĶĹĻĽĿŁŃŅŇŊŌŎŐŒŔŖŘŚŜŞŠŢŤŦŨŪŬŮŰŲŴŶŹŻŽ'; |
||
7050 | $result = Multibyte::strtolower($string); |
||
7051 | $expected = 'āăąćĉċčďđēĕėęěĝğġģĥħĩīĭįijĵķĺļľŀłńņňŋōŏőœŕŗřśŝşšţťŧũūŭůűųŵŷźżž'; |
||
7052 | $this->assertEquals($expected, $result); |
||
7053 | |||
7054 | $string = 'ĤĒĹĻŎ, ŴŐŘĻĎ!'; |
||
7055 | $result = Multibyte::strtolower($string); |
||
7056 | $expected = 'ĥēĺļŏ, ŵőřļď!'; |
||
7057 | $this->assertEquals($expected, $result); |
||
7058 | |||
7059 | $string = 'ĥēĺļŏ, ŵőřļď!'; |
||
7060 | $result = Multibyte::strtolower($string); |
||
7061 | $expected = 'ĥēĺļŏ, ŵőřļď!'; |
||
7062 | $this->assertEquals($expected, $result); |
||
7063 | |||
7064 | $string = 'ἈΙ'; |
||
7065 | $result = Multibyte::strtolower($string); |
||
7066 | $expected = 'ἀι'; |
||
7067 | $this->assertEquals($expected, $result); |
||
7068 | |||
7069 | $string = 'ԀԂԄԆԈԊԌԎԐԒ'; |
||
7070 | $result = Multibyte::strtolower($string); |
||
7071 | $expected = 'ԁԃԅԇԉԋԍԏԑԓ'; |
||
7072 | $this->assertEquals($expected, $result); |
||
7073 | |||
7074 | $string = 'ԱԲԳԴԵԶԷԸԹԺԻԼԽԾԿՀՁՂՃՄՅՆՇՈՉՊՋՌՍՎՏՐՑՒՓՔՕՖև'; |
||
7075 | $result = Multibyte::strtolower($string); |
||
7076 | $expected = 'աբգդեզէըթժիլխծկհձղճմյնշոչպջռսվտրցւփքօֆև'; |
||
7077 | $this->assertEquals($expected, $result); |
||
7078 | |||
7079 | $string = 'ႠႡႢႣႤႥႦႧႨႩႪႫႬႭႮႯႰႱႲႳႴႵႶႷႸႹႺႻႼႽႾႿჀჁჂჃჄჅ'; |
||
7080 | $result = Multibyte::strtolower($string); |
||
7081 | $expected = 'ႠႡႢႣႤႥႦႧႨႩႪႫႬႭႮႯႰႱႲႳႴႵႶႷႸႹႺႻႼႽႾႿჀჁჂჃჄჅ'; |
||
7082 | $this->assertEquals($expected, $result); |
||
7083 | |||
7084 | $string = 'ḀḂḄḆḈḊḌḎḐḒḔḖḘḚḜḞḠḢḤḦḨḪḬḮḰḲḴḶḸḺḼḾṀṂṄṆṈṊṌṎṐṒṔṖṘṚṜṞṠṢṤṦṨṪṬṮṰṲṴṶṸṺṼṾẀẂẄẆẈẊẌẎẐẒẔẖẗẘẙẚẠẢẤẦẨẪẬẮẰẲẴẶẸẺẼẾỀỂỄỆỈỊỌỎỐỒỔỖỘỚỜỞỠỢỤỦỨỪỬỮỰỲỴỶỸ'; |
||
7085 | $result = Multibyte::strtolower($string); |
||
7086 | $expected = 'ḁḃḅḇḉḋḍḏḑḓḕḗḙḛḝḟḡḣḥḧḩḫḭḯḱḳḵḷḹḻḽḿṁṃṅṇṉṋṍṏṑṓṕṗṙṛṝṟṡṣṥṧṩṫṭṯṱṳṵṷṹṻṽṿẁẃẅẇẉẋẍẏẑẓẕẖẗẘẙẚạảấầẩẫậắằẳẵặẹẻẽếềểễệỉịọỏốồổỗộớờởỡợụủứừửữựỳỵỷỹ'; |
||
7087 | $this->assertEquals($expected, $result); |
||
7088 | |||
7089 | $string = 'ΩKÅℲ'; |
||
7090 | $result = Multibyte::strtolower($string); |
||
7091 | $expected = 'ωkåⅎ'; |
||
7092 | $this->assertEquals($expected, $result); |
||
7093 | |||
7094 | $string = 'ΩKÅ'; |
||
7095 | $result = Multibyte::strtolower($string); |
||
7096 | $expected = 'ωkå'; |
||
7097 | $this->assertEquals($expected, $result); |
||
7098 | |||
7099 | $string = 'ΩKÅ'; |
||
7100 | $result = Multibyte::strtolower($string); |
||
7101 | $expected = 'ωkå'; |
||
7102 | $this->assertEquals($expected, $result); |
||
7103 | |||
7104 | $string = 'ⅠⅡⅢⅣⅤⅥⅦⅧⅨⅩⅪⅫⅬⅭⅮⅯↃ'; |
||
7105 | $result = Multibyte::strtolower($string); |
||
7106 | $expected = 'ⅰⅱⅲⅳⅴⅵⅶⅷⅸⅹⅺⅻⅼⅽⅾⅿↄ'; |
||
7107 | $this->assertEquals($expected, $result); |
||
7108 | |||
7109 | $string = 'ⒶⒷⒸⒹⒺⒻⒼⒽⒾⒿⓀⓁⓂⓃⓄⓅⓆⓇⓈⓉⓊⓋⓌⓍⓎⓏ'; |
||
7110 | $result = Multibyte::strtolower($string); |
||
7111 | $expected = 'ⓐⓑⓒⓓⓔⓕⓖⓗⓘⓙⓚⓛⓜⓝⓞⓟⓠⓡⓢⓣⓤⓥⓦⓧⓨⓩ'; |
||
7112 | $this->assertEquals($expected, $result); |
||
7113 | |||
7114 | $string = 'ⰀⰁⰂⰃⰄⰅⰆⰇⰈⰉⰊⰋⰌⰍⰎⰏⰐⰑⰒⰓⰔⰕⰖⰗⰘⰙⰚⰛⰜⰝⰞⰟⰠⰡⰢⰣⰤⰥⰦⰧⰨⰩⰪⰫⰬⰭⰮ'; |
||
7115 | $result = Multibyte::strtolower($string); |
||
7116 | $expected = 'ⰰⰱⰲⰳⰴⰵⰶⰷⰸⰹⰺⰻⰼⰽⰾⰿⱀⱁⱂⱃⱄⱅⱆⱇⱈⱉⱊⱋⱌⱍⱎⱏⱐⱑⱒⱓⱔⱕⱖⱗⱘⱙⱚⱛⱜⱝⱞ'; |
||
7117 | $this->assertEquals($expected, $result); |
||
7118 | |||
7119 | $string = 'ⲀⲂⲄⲆⲈⲊⲌⲎⲐⲒⲔⲖⲘⲚⲜⲞⲠⲢⲤⲦⲨⲪⲬⲮⲰⲲⲴⲶⲸⲺⲼⲾⳀⳂⳄⳆⳈⳊⳌⳎⳐⳒⳔⳖⳘⳚⳜⳞⳠⳢ'; |
||
7120 | $result = Multibyte::strtolower($string); |
||
7121 | $expected = 'ⲁⲃⲅⲇⲉⲋⲍⲏⲑⲓⲕⲗⲙⲛⲝⲟⲡⲣⲥⲧⲩⲫⲭⲯⲱⲳⲵⲷⲹⲻⲽⲿⳁⳃⳅⳇⳉⳋⳍⳏⳑⳓⳕⳗⳙⳛⳝⳟⳡⳣ'; |
||
7122 | $this->assertEquals($expected, $result); |
||
7123 | |||
7124 | $string = 'fffiflffifflſtstﬓﬔﬕﬖﬗ'; |
||
7125 | $result = Multibyte::strtolower($string); |
||
7126 | $expected = 'fffiflffifflſtstﬓﬔﬕﬖﬗ'; |
||
7127 | $this->assertEquals($expected, $result); |
||
7128 | } |
||
7129 | |||
7130 | /**
|
||
7131 | * testUsingMbStrtoupper method
|
||
7132 | *
|
||
7133 | * @return void
|
||
7134 | */
|
||
7135 | public function testUsingMbStrtoupper() { |
||
7136 | $string = '!"#$%&\'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~'; |
||
7137 | $result = mb_strtoupper($string); |
||
7138 | $expected = '!"#$%&\'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`ABCDEFGHIJKLMNOPQRSTUVWXYZ{|}~'; |
||
7139 | $this->assertEquals($expected, $result); |
||
7140 | |||
7141 | $string = '!"#$%&\'()*+,-./0123456789:;<=>?@'; |
||
7142 | $result = mb_strtoupper($string); |
||
7143 | $expected = '!"#$%&\'()*+,-./0123456789:;<=>?@'; |
||
7144 | $this->assertEquals($expected, $result); |
||
7145 | |||
7146 | $string = 'à'; |
||
7147 | $result = mb_strtoupper($string); |
||
7148 | $expected = 'À'; |
||
7149 | $this->assertEquals($expected, $result); |
||
7150 | |||
7151 | $string = 'á'; |
||
7152 | $result = mb_strtoupper($string); |
||
7153 | $expected = 'Á'; |
||
7154 | $this->assertEquals($expected, $result); |
||
7155 | |||
7156 | $string = 'â'; |
||
7157 | $result = mb_strtoupper($string); |
||
7158 | $expected = 'Â'; |
||
7159 | $this->assertEquals($expected, $result); |
||
7160 | |||
7161 | $string = 'ã'; |
||
7162 | $result = mb_strtoupper($string); |
||
7163 | $expected = 'Ã'; |
||
7164 | $this->assertEquals($expected, $result); |
||
7165 | |||
7166 | $string = 'ä'; |
||
7167 | $result = mb_strtoupper($string); |
||
7168 | $expected = 'Ä'; |
||
7169 | $this->assertEquals($expected, $result); |
||
7170 | |||
7171 | $string = 'å'; |
||
7172 | $result = mb_strtoupper($string); |
||
7173 | $expected = 'Å'; |
||
7174 | $this->assertEquals($expected, $result); |
||
7175 | |||
7176 | $string = 'æ'; |
||
7177 | $result = mb_strtoupper($string); |
||
7178 | $expected = 'Æ'; |
||
7179 | $this->assertEquals($expected, $result); |
||
7180 | |||
7181 | $string = 'ç'; |
||
7182 | $result = mb_strtoupper($string); |
||
7183 | $expected = 'Ç'; |
||
7184 | $this->assertEquals($expected, $result); |
||
7185 | |||
7186 | $string = 'è'; |
||
7187 | $result = mb_strtoupper($string); |
||
7188 | $expected = 'È'; |
||
7189 | $this->assertEquals($expected, $result); |
||
7190 | |||
7191 | $string = 'é'; |
||
7192 | $result = mb_strtoupper($string); |
||
7193 | $expected = 'É'; |
||
7194 | $this->assertEquals($expected, $result); |
||
7195 | |||
7196 | $string = 'ê'; |
||
7197 | $result = mb_strtoupper($string); |
||
7198 | $expected = 'Ê'; |
||
7199 | $this->assertEquals($expected, $result); |
||
7200 | |||
7201 | $string = 'ë'; |
||
7202 | $result = mb_strtoupper($string); |
||
7203 | $expected = 'Ë'; |
||
7204 | $this->assertEquals($expected, $result); |
||
7205 | |||
7206 | $string = 'ì'; |
||
7207 | $result = mb_strtoupper($string); |
||
7208 | $expected = 'Ì'; |
||
7209 | $this->assertEquals($expected, $result); |
||
7210 | |||
7211 | $string = 'í'; |
||
7212 | $result = mb_strtoupper($string); |
||
7213 | $expected = 'Í'; |
||
7214 | $this->assertEquals($expected, $result); |
||
7215 | |||
7216 | $string = 'î'; |
||
7217 | $result = mb_strtoupper($string); |
||
7218 | $expected = 'Î'; |
||
7219 | $this->assertEquals($expected, $result); |
||
7220 | |||
7221 | $string = 'ï'; |
||
7222 | $result = mb_strtoupper($string); |
||
7223 | $expected = 'Ï'; |
||
7224 | $this->assertEquals($expected, $result); |
||
7225 | |||
7226 | $string = 'ð'; |
||
7227 | $result = mb_strtoupper($string); |
||
7228 | $expected = 'Ð'; |
||
7229 | $this->assertEquals($expected, $result); |
||
7230 | |||
7231 | $string = 'ñ'; |
||
7232 | $result = mb_strtoupper($string); |
||
7233 | $expected = 'Ñ'; |
||
7234 | $this->assertEquals($expected, $result); |
||
7235 | |||
7236 | $string = 'ò'; |
||
7237 | $result = mb_strtoupper($string); |
||
7238 | $expected = 'Ò'; |
||
7239 | $this->assertEquals($expected, $result); |
||
7240 | |||
7241 | $string = 'ó'; |
||
7242 | $result = mb_strtoupper($string); |
||
7243 | $expected = 'Ó'; |
||
7244 | $this->assertEquals($expected, $result); |
||
7245 | |||
7246 | $string = 'ô'; |
||
7247 | $result = mb_strtoupper($string); |
||
7248 | $expected = 'Ô'; |
||
7249 | $this->assertEquals($expected, $result); |
||
7250 | |||
7251 | $string = 'õ'; |
||
7252 | $result = mb_strtoupper($string); |
||
7253 | $expected = 'Õ'; |
||
7254 | $this->assertEquals($expected, $result); |
||
7255 | |||
7256 | $string = 'ö'; |
||
7257 | $result = mb_strtoupper($string); |
||
7258 | $expected = 'Ö'; |
||
7259 | $this->assertEquals($expected, $result); |
||
7260 | |||
7261 | $string = 'ø'; |
||
7262 | $result = mb_strtoupper($string); |
||
7263 | $expected = 'Ø'; |
||
7264 | $this->assertEquals($expected, $result); |
||
7265 | |||
7266 | $string = 'ù'; |
||
7267 | $result = mb_strtoupper($string); |
||
7268 | $expected = 'Ù'; |
||
7269 | $this->assertEquals($expected, $result); |
||
7270 | |||
7271 | $string = 'ú'; |
||
7272 | $result = mb_strtoupper($string); |
||
7273 | $expected = 'Ú'; |
||
7274 | $this->assertEquals($expected, $result); |
||
7275 | |||
7276 | $string = 'û'; |
||
7277 | $result = mb_strtoupper($string); |
||
7278 | $expected = 'Û'; |
||
7279 | $this->assertEquals($expected, $result); |
||
7280 | |||
7281 | $string = 'ü'; |
||
7282 | $result = mb_strtoupper($string); |
||
7283 | $expected = 'Ü'; |
||
7284 | $this->assertEquals($expected, $result); |
||
7285 | |||
7286 | $string = 'ý'; |
||
7287 | $result = mb_strtoupper($string); |
||
7288 | $expected = 'Ý'; |
||
7289 | $this->assertEquals($expected, $result); |
||
7290 | |||
7291 | $string = 'þ'; |
||
7292 | $result = mb_strtoupper($string); |
||
7293 | $expected = 'Þ'; |
||
7294 | $this->assertEquals($expected, $result); |
||
7295 | |||
7296 | $string = 'àáâãäåæçèéêëìíîïðñòóôõöøùúûüýþ'; |
||
7297 | $result = mb_strtoupper($string); |
||
7298 | $expected = 'ÀÁÂÃÄÅÆÇÈÉÊËÌÍÎÏÐÑÒÓÔÕÖØÙÚÛÜÝÞ'; |
||
7299 | $this->assertEquals($expected, $result); |
||
7300 | |||
7301 | $string = 'ā'; |
||
7302 | $result = mb_strtoupper($string); |
||
7303 | $expected = 'Ā'; |
||
7304 | $this->assertEquals($expected, $result); |
||
7305 | |||
7306 | $string = 'ă'; |
||
7307 | $result = mb_strtoupper($string); |
||
7308 | $expected = 'Ă'; |
||
7309 | $this->assertEquals($expected, $result); |
||
7310 | |||
7311 | $string = 'ą'; |
||
7312 | $result = mb_strtoupper($string); |
||
7313 | $expected = 'Ą'; |
||
7314 | $this->assertEquals($expected, $result); |
||
7315 | |||
7316 | $string = 'ć'; |
||
7317 | $result = mb_strtoupper($string); |
||
7318 | $expected = 'Ć'; |
||
7319 | $this->assertEquals($expected, $result); |
||
7320 | |||
7321 | $string = 'ĉ'; |
||
7322 | $result = mb_strtoupper($string); |
||
7323 | $expected = 'Ĉ'; |
||
7324 | $this->assertEquals($expected, $result); |
||
7325 | |||
7326 | $string = 'ċ'; |
||
7327 | $result = mb_strtoupper($string); |
||
7328 | $expected = 'Ċ'; |
||
7329 | $this->assertEquals($expected, $result); |
||
7330 | |||
7331 | $string = 'č'; |
||
7332 | $result = mb_strtoupper($string); |
||
7333 | $expected = 'Č'; |
||
7334 | $this->assertEquals($expected, $result); |
||
7335 | |||
7336 | $string = 'ď'; |
||
7337 | $result = mb_strtoupper($string); |
||
7338 | $expected = 'Ď'; |
||
7339 | $this->assertEquals($expected, $result); |
||
7340 | |||
7341 | $string = 'đ'; |
||
7342 | $result = mb_strtoupper($string); |
||
7343 | $expected = 'Đ'; |
||
7344 | $this->assertEquals($expected, $result); |
||
7345 | |||
7346 | $string = 'ē'; |
||
7347 | $result = mb_strtoupper($string); |
||
7348 | $expected = 'Ē'; |
||
7349 | $this->assertEquals($expected, $result); |
||
7350 | |||
7351 | $string = 'ĕ'; |
||
7352 | $result = mb_strtoupper($string); |
||
7353 | $expected = 'Ĕ'; |
||
7354 | $this->assertEquals($expected, $result); |
||
7355 | |||
7356 | $string = 'ė'; |
||
7357 | $result = mb_strtoupper($string); |
||
7358 | $expected = 'Ė'; |
||
7359 | $this->assertEquals($expected, $result); |
||
7360 | |||
7361 | $string = 'ę'; |
||
7362 | $result = mb_strtoupper($string); |
||
7363 | $expected = 'Ę'; |
||
7364 | $this->assertEquals($expected, $result); |
||
7365 | |||
7366 | $string = 'ě'; |
||
7367 | $result = mb_strtoupper($string); |
||
7368 | $expected = 'Ě'; |
||
7369 | $this->assertEquals($expected, $result); |
||
7370 | |||
7371 | $string = 'ĝ'; |
||
7372 | $result = mb_strtoupper($string); |
||
7373 | $expected = 'Ĝ'; |
||
7374 | $this->assertEquals($expected, $result); |
||
7375 | |||
7376 | $string = 'ğ'; |
||
7377 | $result = mb_strtoupper($string); |
||
7378 | $expected = 'Ğ'; |
||
7379 | $this->assertEquals($expected, $result); |
||
7380 | |||
7381 | $string = 'ġ'; |
||
7382 | $result = mb_strtoupper($string); |
||
7383 | $expected = 'Ġ'; |
||
7384 | $this->assertEquals($expected, $result); |
||
7385 | |||
7386 | $string = 'ģ'; |
||
7387 | $result = mb_strtoupper($string); |
||
7388 | $expected = 'Ģ'; |
||
7389 | $this->assertEquals($expected, $result); |
||
7390 | |||
7391 | $string = 'ĥ'; |
||
7392 | $result = mb_strtoupper($string); |
||
7393 | $expected = 'Ĥ'; |
||
7394 | $this->assertEquals($expected, $result); |
||
7395 | |||
7396 | $string = 'ħ'; |
||
7397 | $result = mb_strtoupper($string); |
||
7398 | $expected = 'Ħ'; |
||
7399 | $this->assertEquals($expected, $result); |
||
7400 | |||
7401 | $string = 'ĩ'; |
||
7402 | $result = mb_strtoupper($string); |
||
7403 | $expected = 'Ĩ'; |
||
7404 | $this->assertEquals($expected, $result); |
||
7405 | |||
7406 | $string = 'ī'; |
||
7407 | $result = mb_strtoupper($string); |
||
7408 | $expected = 'Ī'; |
||
7409 | $this->assertEquals($expected, $result); |
||
7410 | |||
7411 | $string = 'ĭ'; |
||
7412 | $result = mb_strtoupper($string); |
||
7413 | $expected = 'Ĭ'; |
||
7414 | $this->assertEquals($expected, $result); |
||
7415 | |||
7416 | $string = 'į'; |
||
7417 | $result = mb_strtoupper($string); |
||
7418 | $expected = 'Į'; |
||
7419 | $this->assertEquals($expected, $result); |
||
7420 | |||
7421 | $string = 'ij'; |
||
7422 | $result = mb_strtoupper($string); |
||
7423 | $expected = 'IJ'; |
||
7424 | $this->assertEquals($expected, $result); |
||
7425 | |||
7426 | $string = 'ĵ'; |
||
7427 | $result = mb_strtoupper($string); |
||
7428 | $expected = 'Ĵ'; |
||
7429 | $this->assertEquals($expected, $result); |
||
7430 | |||
7431 | $string = 'ķ'; |
||
7432 | $result = mb_strtoupper($string); |
||
7433 | $expected = 'Ķ'; |
||
7434 | $this->assertEquals($expected, $result); |
||
7435 | |||
7436 | $string = 'ĺ'; |
||
7437 | $result = mb_strtoupper($string); |
||
7438 | $expected = 'Ĺ'; |
||
7439 | $this->assertEquals($expected, $result); |
||
7440 | |||
7441 | $string = 'ļ'; |
||
7442 | $result = mb_strtoupper($string); |
||
7443 | $expected = 'Ļ'; |
||
7444 | $this->assertEquals($expected, $result); |
||
7445 | |||
7446 | $string = 'ľ'; |
||
7447 | $result = mb_strtoupper($string); |
||
7448 | $expected = 'Ľ'; |
||
7449 | $this->assertEquals($expected, $result); |
||
7450 | |||
7451 | $string = 'ŀ'; |
||
7452 | $result = mb_strtoupper($string); |
||
7453 | $expected = 'Ŀ'; |
||
7454 | $this->assertEquals($expected, $result); |
||
7455 | |||
7456 | $string = 'ł'; |
||
7457 | $result = mb_strtoupper($string); |
||
7458 | $expected = 'Ł'; |
||
7459 | $this->assertEquals($expected, $result); |
||
7460 | |||
7461 | $string = 'ń'; |
||
7462 | $result = mb_strtoupper($string); |
||
7463 | $expected = 'Ń'; |
||
7464 | $this->assertEquals($expected, $result); |
||
7465 | |||
7466 | $string = 'ņ'; |
||
7467 | $result = mb_strtoupper($string); |
||
7468 | $expected = 'Ņ'; |
||
7469 | $this->assertEquals($expected, $result); |
||
7470 | |||
7471 | $string = 'ň'; |
||
7472 | $result = mb_strtoupper($string); |
||
7473 | $expected = 'Ň'; |
||
7474 | $this->assertEquals($expected, $result); |
||
7475 | |||
7476 | $string = 'ŋ'; |
||
7477 | $result = mb_strtoupper($string); |
||
7478 | $expected = 'Ŋ'; |
||
7479 | $this->assertEquals($expected, $result); |
||
7480 | |||
7481 | $string = 'ō'; |
||
7482 | $result = mb_strtoupper($string); |
||
7483 | $expected = 'Ō'; |
||
7484 | $this->assertEquals($expected, $result); |
||
7485 | |||
7486 | $string = 'ŏ'; |
||
7487 | $result = mb_strtoupper($string); |
||
7488 | $expected = 'Ŏ'; |
||
7489 | $this->assertEquals($expected, $result); |
||
7490 | |||
7491 | $string = 'ő'; |
||
7492 | $result = mb_strtoupper($string); |
||
7493 | $expected = 'Ő'; |
||
7494 | $this->assertEquals($expected, $result); |
||
7495 | |||
7496 | $string = 'œ'; |
||
7497 | $result = mb_strtoupper($string); |
||
7498 | $expected = 'Œ'; |
||
7499 | $this->assertEquals($expected, $result); |
||
7500 | |||
7501 | $string = 'ŕ'; |
||
7502 | $result = mb_strtoupper($string); |
||
7503 | $expected = 'Ŕ'; |
||
7504 | $this->assertEquals($expected, $result); |
||
7505 | |||
7506 | $string = 'ŗ'; |
||
7507 | $result = mb_strtoupper($string); |
||
7508 | $expected = 'Ŗ'; |
||
7509 | $this->assertEquals($expected, $result); |
||
7510 | |||
7511 | $string = 'ř'; |
||
7512 | $result = mb_strtoupper($string); |
||
7513 | $expected = 'Ř'; |
||
7514 | $this->assertEquals($expected, $result); |
||
7515 | |||
7516 | $string = 'ś'; |
||
7517 | $result = mb_strtoupper($string); |
||
7518 | $expected = 'Ś'; |
||
7519 | $this->assertEquals($expected, $result); |
||
7520 | |||
7521 | $string = 'ŝ'; |
||
7522 | $result = mb_strtoupper($string); |
||
7523 | $expected = 'Ŝ'; |
||
7524 | $this->assertEquals($expected, $result); |
||
7525 | |||
7526 | $string = 'ş'; |
||
7527 | $result = mb_strtoupper($string); |
||
7528 | $expected = 'Ş'; |
||
7529 | $this->assertEquals($expected, $result); |
||
7530 | |||
7531 | $string = 'š'; |
||
7532 | $result = mb_strtoupper($string); |
||
7533 | $expected = 'Š'; |
||
7534 | $this->assertEquals($expected, $result); |
||
7535 | |||
7536 | $string = 'ţ'; |
||
7537 | $result = mb_strtoupper($string); |
||
7538 | $expected = 'Ţ'; |
||
7539 | $this->assertEquals($expected, $result); |
||
7540 | |||
7541 | $string = 'ť'; |
||
7542 | $result = mb_strtoupper($string); |
||
7543 | $expected = 'Ť'; |
||
7544 | $this->assertEquals($expected, $result); |
||
7545 | |||
7546 | $string = 'ŧ'; |
||
7547 | $result = mb_strtoupper($string); |
||
7548 | $expected = 'Ŧ'; |
||
7549 | $this->assertEquals($expected, $result); |
||
7550 | |||
7551 | $string = 'ũ'; |
||
7552 | $result = mb_strtoupper($string); |
||
7553 | $expected = 'Ũ'; |
||
7554 | $this->assertEquals($expected, $result); |
||
7555 | |||
7556 | $string = 'ū'; |
||
7557 | $result = mb_strtoupper($string); |
||
7558 | $expected = 'Ū'; |
||
7559 | $this->assertEquals($expected, $result); |
||
7560 | |||
7561 | $string = 'ŭ'; |
||
7562 | $result = mb_strtoupper($string); |
||
7563 | $expected = 'Ŭ'; |
||
7564 | $this->assertEquals($expected, $result); |
||
7565 | |||
7566 | $string = 'ů'; |
||
7567 | $result = mb_strtoupper($string); |
||
7568 | $expected = 'Ů'; |
||
7569 | $this->assertEquals($expected, $result); |
||
7570 | |||
7571 | $string = 'ű'; |
||
7572 | $result = mb_strtoupper($string); |
||
7573 | $expected = 'Ű'; |
||
7574 | $this->assertEquals($expected, $result); |
||
7575 | |||
7576 | $string = 'ų'; |
||
7577 | $result = mb_strtoupper($string); |
||
7578 | $expected = 'Ų'; |
||
7579 | $this->assertEquals($expected, $result); |
||
7580 | |||
7581 | $string = 'ŵ'; |
||
7582 | $result = mb_strtoupper($string); |
||
7583 | $expected = 'Ŵ'; |
||
7584 | $this->assertEquals($expected, $result); |
||
7585 | |||
7586 | $string = 'ŷ'; |
||
7587 | $result = mb_strtoupper($string); |
||
7588 | $expected = 'Ŷ'; |
||
7589 | $this->assertEquals($expected, $result); |
||
7590 | |||
7591 | $string = 'ź'; |
||
7592 | $result = mb_strtoupper($string); |
||
7593 | $expected = 'Ź'; |
||
7594 | $this->assertEquals($expected, $result); |
||
7595 | |||
7596 | $string = 'ż'; |
||
7597 | $result = mb_strtoupper($string); |
||
7598 | $expected = 'Ż'; |
||
7599 | $this->assertEquals($expected, $result); |
||
7600 | |||
7601 | $string = 'ž'; |
||
7602 | $result = mb_strtoupper($string); |
||
7603 | $expected = 'Ž'; |
||
7604 | $this->assertEquals($expected, $result); |
||
7605 | |||
7606 | $string = 'āăąćĉċčďđēĕėęěĝğġģĥħĩīĭįijĵķĺļľŀłńņňŋōŏőœŕŗřśŝşšţťŧũūŭůűųŵŷźżž'; |
||
7607 | $result = mb_strtoupper($string); |
||
7608 | $expected = 'ĀĂĄĆĈĊČĎĐĒĔĖĘĚĜĞĠĢĤĦĨĪĬĮIJĴĶĹĻĽĿŁŃŅŇŊŌŎŐŒŔŖŘŚŜŞŠŢŤŦŨŪŬŮŰŲŴŶŹŻŽ'; |
||
7609 | $this->assertEquals($expected, $result); |
||
7610 | |||
7611 | $string = 'Ĥēĺļŏ, Ŵőřļď!'; |
||
7612 | $result = mb_strtoupper($string); |
||
7613 | $expected = 'ĤĒĹĻŎ, ŴŐŘĻĎ!'; |
||
7614 | $this->assertEquals($expected, $result); |
||
7615 | |||
7616 | $string = 'ἀι'; |
||
7617 | $result = mb_strtoupper($string); |
||
7618 | $expected = 'ἈΙ'; |
||
7619 | $this->assertEquals($expected, $result); |
||
7620 | |||
7621 | $string = 'ԁԃԅԇԉԋԍԏԐԒ'; |
||
7622 | $result = mb_strtoupper($string); |
||
7623 | $expected = 'ԀԂԄԆԈԊԌԎԐԒ'; |
||
7624 | $this->assertEquals($expected, $result); |
||
7625 | |||
7626 | $string = 'աբգդեզէըթժիլխծկհձղճմյնշոչպջռսվտրցւփքօֆև'; |
||
7627 | $result = mb_strtoupper($string); |
||
7628 | $expected = 'ԱԲԳԴԵԶԷԸԹԺԻԼԽԾԿՀՁՂՃՄՅՆՇՈՉՊՋՌՍՎՏՐՑՒՓՔՕՖև'; |
||
7629 | $this->assertEquals($expected, $result); |
||
7630 | |||
7631 | $string = 'ႠႡႢႣႤႥႦႧႨႩႪႫႬႭႮႯႰႱႲႳႴႵႶႷႸႹႺႻႼႽႾႿჀჁჂჃჄჅ'; |
||
7632 | $result = mb_strtoupper($string); |
||
7633 | $expected = 'ႠႡႢႣႤႥႦႧႨႩႪႫႬႭႮႯႰႱႲႳႴႵႶႷႸႹႺႻႼႽႾႿჀჁჂჃჄჅ'; |
||
7634 | $this->assertEquals($expected, $result); |
||
7635 | |||
7636 | $string = 'ḁḃḅḇḉḋḍḏḑḓḕḗḙḛḝḟḡḣḥḧḩḫḭḯḱḳḵḷḹḻḽḿṁṃṅṇṉṋṍṏṑṓṕṗṙṛṝṟṡṣṥṧṩṫṭṯṱṳṵṷṹṻṽṿẁẃẅẇẉẋẍẏẑẓẕẖẗẘẙẚạảấầẩẫậắằẳẵặẹẻẽếềểễệỉịọỏốồổỗộớờởỡợụủứừửữựỳỵỷỹ'; |
||
7637 | $result = mb_strtoupper($string); |
||
7638 | $expected = 'ḀḂḄḆḈḊḌḎḐḒḔḖḘḚḜḞḠḢḤḦḨḪḬḮḰḲḴḶḸḺḼḾṀṂṄṆṈṊṌṎṐṒṔṖṘṚṜṞṠṢṤṦṨṪṬṮṰṲṴṶṸṺṼṾẀẂẄẆẈẊẌẎẐẒẔẖẗẘẙẚẠẢẤẦẨẪẬẮẰẲẴẶẸẺẼẾỀỂỄỆỈỊỌỎỐỒỔỖỘỚỜỞỠỢỤỦỨỪỬỮỰỲỴỶỸ'; |
||
7639 | $this->assertEquals($expected, $result); |
||
7640 | |||
7641 | $string = 'ωkå'; |
||
7642 | $result = mb_strtoupper($string); |
||
7643 | $expected = 'ΩKÅ'; |
||
7644 | $this->assertEquals($expected, $result); |
||
7645 | |||
7646 | $string = 'fffiflffifflſtstﬓﬔﬕﬖﬗ'; |
||
7647 | $result = mb_strtoupper($string); |
||
7648 | $expected = 'fffiflffifflſtstﬓﬔﬕﬖﬗ'; |
||
7649 | $this->assertEquals($expected, $result); |
||
7650 | } |
||
7651 | |||
7652 | /**
|
||
7653 | * testMultibyteStrtoupper method
|
||
7654 | *
|
||
7655 | * @return void
|
||
7656 | */
|
||
7657 | public function testMultibyteStrtoupper() { |
||
7658 | $string = '!"#$%&\'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~'; |
||
7659 | $result = Multibyte::strtoupper($string); |
||
7660 | $expected = '!"#$%&\'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`ABCDEFGHIJKLMNOPQRSTUVWXYZ{|}~'; |
||
7661 | $this->assertEquals($expected, $result); |
||
7662 | |||
7663 | $string = '!"#$%&\'()*+,-./0123456789:;<=>?@'; |
||
7664 | $result = Multibyte::strtoupper($string); |
||
7665 | $expected = '!"#$%&\'()*+,-./0123456789:;<=>?@'; |
||
7666 | $this->assertEquals($expected, $result); |
||
7667 | |||
7668 | $string = 'à'; |
||
7669 | $result = Multibyte::strtoupper($string); |
||
7670 | $expected = 'À'; |
||
7671 | $this->assertEquals($expected, $result); |
||
7672 | |||
7673 | $string = 'á'; |
||
7674 | $result = Multibyte::strtoupper($string); |
||
7675 | $expected = 'Á'; |
||
7676 | $this->assertEquals($expected, $result); |
||
7677 | |||
7678 | $string = 'â'; |
||
7679 | $result = Multibyte::strtoupper($string); |
||
7680 | $expected = 'Â'; |
||
7681 | $this->assertEquals($expected, $result); |
||
7682 | |||
7683 | $string = 'ã'; |
||
7684 | $result = Multibyte::strtoupper($string); |
||
7685 | $expected = 'Ã'; |
||
7686 | $this->assertEquals($expected, $result); |
||
7687 | |||
7688 | $string = 'ä'; |
||
7689 | $result = Multibyte::strtoupper($string); |
||
7690 | $expected = 'Ä'; |
||
7691 | $this->assertEquals($expected, $result); |
||
7692 | |||
7693 | $string = 'å'; |
||
7694 | $result = Multibyte::strtoupper($string); |
||
7695 | $expected = 'Å'; |
||
7696 | $this->assertEquals($expected, $result); |
||
7697 | |||
7698 | $string = 'æ'; |
||
7699 | $result = Multibyte::strtoupper($string); |
||
7700 | $expected = 'Æ'; |
||
7701 | $this->assertEquals($expected, $result); |
||
7702 | |||
7703 | $string = 'ç'; |
||
7704 | $result = Multibyte::strtoupper($string); |
||
7705 | $expected = 'Ç'; |
||
7706 | $this->assertEquals($expected, $result); |
||
7707 | |||
7708 | $string = 'è'; |
||
7709 | $result = Multibyte::strtoupper($string); |
||
7710 | $expected = 'È'; |
||
7711 | $this->assertEquals($expected, $result); |
||
7712 | |||
7713 | $string = 'é'; |
||
7714 | $result = Multibyte::strtoupper($string); |
||
7715 | $expected = 'É'; |
||
7716 | $this->assertEquals($expected, $result); |
||
7717 | |||
7718 | $string = 'ê'; |
||
7719 | $result = Multibyte::strtoupper($string); |
||
7720 | $expected = 'Ê'; |
||
7721 | $this->assertEquals($expected, $result); |
||
7722 | |||
7723 | $string = 'ë'; |
||
7724 | $result = Multibyte::strtoupper($string); |
||
7725 | $expected = 'Ë'; |
||
7726 | $this->assertEquals($expected, $result); |
||
7727 | |||
7728 | $string = 'ì'; |
||
7729 | $result = Multibyte::strtoupper($string); |
||
7730 | $expected = 'Ì'; |
||
7731 | $this->assertEquals($expected, $result); |
||
7732 | |||
7733 | $string = 'í'; |
||
7734 | $result = Multibyte::strtoupper($string); |
||
7735 | $expected = 'Í'; |
||
7736 | $this->assertEquals($expected, $result); |
||
7737 | |||
7738 | $string = 'î'; |
||
7739 | $result = Multibyte::strtoupper($string); |
||
7740 | $expected = 'Î'; |
||
7741 | $this->assertEquals($expected, $result); |
||
7742 | |||
7743 | $string = 'ï'; |
||
7744 | $result = Multibyte::strtoupper($string); |
||
7745 | $expected = 'Ï'; |
||
7746 | $this->assertEquals($expected, $result); |
||
7747 | |||
7748 | $string = 'ð'; |
||
7749 | $result = Multibyte::strtoupper($string); |
||
7750 | $expected = 'Ð'; |
||
7751 | $this->assertEquals($expected, $result); |
||
7752 | |||
7753 | $string = 'ñ'; |
||
7754 | $result = Multibyte::strtoupper($string); |
||
7755 | $expected = 'Ñ'; |
||
7756 | $this->assertEquals($expected, $result); |
||
7757 | |||
7758 | $string = 'ò'; |
||
7759 | $result = Multibyte::strtoupper($string); |
||
7760 | $expected = 'Ò'; |
||
7761 | $this->assertEquals($expected, $result); |
||
7762 | |||
7763 | $string = 'ó'; |
||
7764 | $result = Multibyte::strtoupper($string); |
||
7765 | $expected = 'Ó'; |
||
7766 | $this->assertEquals($expected, $result); |
||
7767 | |||
7768 | $string = 'ô'; |
||
7769 | $result = Multibyte::strtoupper($string); |
||
7770 | $expected = 'Ô'; |
||
7771 | $this->assertEquals($expected, $result); |
||
7772 | |||
7773 | $string = 'õ'; |
||
7774 | $result = Multibyte::strtoupper($string); |
||
7775 | $expected = 'Õ'; |
||
7776 | $this->assertEquals($expected, $result); |
||
7777 | |||
7778 | $string = 'ö'; |
||
7779 | $result = Multibyte::strtoupper($string); |
||
7780 | $expected = 'Ö'; |
||
7781 | $this->assertEquals($expected, $result); |
||
7782 | |||
7783 | $string = 'ø'; |
||
7784 | $result = Multibyte::strtoupper($string); |
||
7785 | $expected = 'Ø'; |
||
7786 | $this->assertEquals($expected, $result); |
||
7787 | |||
7788 | $string = 'ù'; |
||
7789 | $result = Multibyte::strtoupper($string); |
||
7790 | $expected = 'Ù'; |
||
7791 | $this->assertEquals($expected, $result); |
||
7792 | |||
7793 | $string = 'ú'; |
||
7794 | $result = Multibyte::strtoupper($string); |
||
7795 | $expected = 'Ú'; |
||
7796 | $this->assertEquals($expected, $result); |
||
7797 | |||
7798 | $string = 'û'; |
||
7799 | $result = Multibyte::strtoupper($string); |
||
7800 | $expected = 'Û'; |
||
7801 | $this->assertEquals($expected, $result); |
||
7802 | |||
7803 | $string = 'ü'; |
||
7804 | $result = Multibyte::strtoupper($string); |
||
7805 | $expected = 'Ü'; |
||
7806 | $this->assertEquals($expected, $result); |
||
7807 | |||
7808 | $string = 'ý'; |
||
7809 | $result = Multibyte::strtoupper($string); |
||
7810 | $expected = 'Ý'; |
||
7811 | $this->assertEquals($expected, $result); |
||
7812 | |||
7813 | $string = 'þ'; |
||
7814 | $result = Multibyte::strtoupper($string); |
||
7815 | $expected = 'Þ'; |
||
7816 | $this->assertEquals($expected, $result); |
||
7817 | |||
7818 | $string = 'àáâãäåæçèéêëìíîïðñòóôõöøùúûüýþ'; |
||
7819 | $result = Multibyte::strtoupper($string); |
||
7820 | $expected = 'ÀÁÂÃÄÅÆÇÈÉÊËÌÍÎÏÐÑÒÓÔÕÖØÙÚÛÜÝÞ'; |
||
7821 | $this->assertEquals($expected, $result); |
||
7822 | |||
7823 | $string = 'ā'; |
||
7824 | $result = Multibyte::strtoupper($string); |
||
7825 | $expected = 'Ā'; |
||
7826 | $this->assertEquals($expected, $result); |
||
7827 | |||
7828 | $string = 'ă'; |
||
7829 | $result = Multibyte::strtoupper($string); |
||
7830 | $expected = 'Ă'; |
||
7831 | $this->assertEquals($expected, $result); |
||
7832 | |||
7833 | $string = 'ą'; |
||
7834 | $result = Multibyte::strtoupper($string); |
||
7835 | $expected = 'Ą'; |
||
7836 | $this->assertEquals($expected, $result); |
||
7837 | |||
7838 | $string = 'ć'; |
||
7839 | $result = Multibyte::strtoupper($string); |
||
7840 | $expected = 'Ć'; |
||
7841 | $this->assertEquals($expected, $result); |
||
7842 | |||
7843 | $string = 'ĉ'; |
||
7844 | $result = Multibyte::strtoupper($string); |
||
7845 | $expected = 'Ĉ'; |
||
7846 | $this->assertEquals($expected, $result); |
||
7847 | |||
7848 | $string = 'ċ'; |
||
7849 | $result = Multibyte::strtoupper($string); |
||
7850 | $expected = 'Ċ'; |
||
7851 | $this->assertEquals($expected, $result); |
||
7852 | |||
7853 | $string = 'č'; |
||
7854 | $result = Multibyte::strtoupper($string); |
||
7855 | $expected = 'Č'; |
||
7856 | $this->assertEquals($expected, $result); |
||
7857 | |||
7858 | $string = 'ď'; |
||
7859 | $result = Multibyte::strtoupper($string); |
||
7860 | $expected = 'Ď'; |
||
7861 | $this->assertEquals($expected, $result); |
||
7862 | |||
7863 | $string = 'đ'; |
||
7864 | $result = Multibyte::strtoupper($string); |
||
7865 | $expected = 'Đ'; |
||
7866 | $this->assertEquals($expected, $result); |
||
7867 | |||
7868 | $string = 'ē'; |
||
7869 | $result = Multibyte::strtoupper($string); |
||
7870 | $expected = 'Ē'; |
||
7871 | $this->assertEquals($expected, $result); |
||
7872 | |||
7873 | $string = 'ĕ'; |
||
7874 | $result = Multibyte::strtoupper($string); |
||
7875 | $expected = 'Ĕ'; |
||
7876 | $this->assertEquals($expected, $result); |
||
7877 | |||
7878 | $string = 'ė'; |
||
7879 | $result = Multibyte::strtoupper($string); |
||
7880 | $expected = 'Ė'; |
||
7881 | $this->assertEquals($expected, $result); |
||
7882 | |||
7883 | $string = 'ę'; |
||
7884 | $result = Multibyte::strtoupper($string); |
||
7885 | $expected = 'Ę'; |
||
7886 | $this->assertEquals($expected, $result); |
||
7887 | |||
7888 | $string = 'ě'; |
||
7889 | $result = Multibyte::strtoupper($string); |
||
7890 | $expected = 'Ě'; |
||
7891 | $this->assertEquals($expected, $result); |
||
7892 | |||
7893 | $string = 'ĝ'; |
||
7894 | $result = Multibyte::strtoupper($string); |
||
7895 | $expected = 'Ĝ'; |
||
7896 | $this->assertEquals($expected, $result); |
||
7897 | |||
7898 | $string = 'ğ'; |
||
7899 | $result = Multibyte::strtoupper($string); |
||
7900 | $expected = 'Ğ'; |
||
7901 | $this->assertEquals($expected, $result); |
||
7902 | |||
7903 | $string = 'ġ'; |
||
7904 | $result = Multibyte::strtoupper($string); |
||
7905 | $expected = 'Ġ'; |
||
7906 | $this->assertEquals($expected, $result); |
||
7907 | |||
7908 | $string = 'ģ'; |
||
7909 | $result = Multibyte::strtoupper($string); |
||
7910 | $expected = 'Ģ'; |
||
7911 | $this->assertEquals($expected, $result); |
||
7912 | |||
7913 | $string = 'ĥ'; |
||
7914 | $result = Multibyte::strtoupper($string); |
||
7915 | $expected = 'Ĥ'; |
||
7916 | $this->assertEquals($expected, $result); |
||
7917 | |||
7918 | $string = 'ħ'; |
||
7919 | $result = Multibyte::strtoupper($string); |
||
7920 | $expected = 'Ħ'; |
||
7921 | $this->assertEquals($expected, $result); |
||
7922 | |||
7923 | $string = 'ĩ'; |
||
7924 | $result = Multibyte::strtoupper($string); |
||
7925 | $expected = 'Ĩ'; |
||
7926 | $this->assertEquals($expected, $result); |
||
7927 | |||
7928 | $string = 'ī'; |
||
7929 | $result = Multibyte::strtoupper($string); |
||
7930 | $expected = 'Ī'; |
||
7931 | $this->assertEquals($expected, $result); |
||
7932 | |||
7933 | $string = 'ĭ'; |
||
7934 | $result = Multibyte::strtoupper($string); |
||
7935 | $expected = 'Ĭ'; |
||
7936 | $this->assertEquals($expected, $result); |
||
7937 | |||
7938 | $string = 'į'; |
||
7939 | $result = Multibyte::strtoupper($string); |
||
7940 | $expected = 'Į'; |
||
7941 | $this->assertEquals($expected, $result); |
||
7942 | |||
7943 | $string = 'ij'; |
||
7944 | $result = Multibyte::strtoupper($string); |
||
7945 | $expected = 'IJ'; |
||
7946 | $this->assertEquals($expected, $result); |
||
7947 | |||
7948 | $string = 'ĵ'; |
||
7949 | $result = Multibyte::strtoupper($string); |
||
7950 | $expected = 'Ĵ'; |
||
7951 | $this->assertEquals($expected, $result); |
||
7952 | |||
7953 | $string = 'ķ'; |
||
7954 | $result = Multibyte::strtoupper($string); |
||
7955 | $expected = 'Ķ'; |
||
7956 | $this->assertEquals($expected, $result); |
||
7957 | |||
7958 | $string = 'ĺ'; |
||
7959 | $result = Multibyte::strtoupper($string); |
||
7960 | $expected = 'Ĺ'; |
||
7961 | $this->assertEquals($expected, $result); |
||
7962 | |||
7963 | $string = 'ļ'; |
||
7964 | $result = Multibyte::strtoupper($string); |
||
7965 | $expected = 'Ļ'; |
||
7966 | $this->assertEquals($expected, $result); |
||
7967 | |||
7968 | $string = 'ľ'; |
||
7969 | $result = Multibyte::strtoupper($string); |
||
7970 | $expected = 'Ľ'; |
||
7971 | $this->assertEquals($expected, $result); |
||
7972 | |||
7973 | $string = 'ŀ'; |
||
7974 | $result = Multibyte::strtoupper($string); |
||
7975 | $expected = 'Ŀ'; |
||
7976 | $this->assertEquals($expected, $result); |
||
7977 | |||
7978 | $string = 'ł'; |
||
7979 | $result = Multibyte::strtoupper($string); |
||
7980 | $expected = 'Ł'; |
||
7981 | $this->assertEquals($expected, $result); |
||
7982 | |||
7983 | $string = 'ń'; |
||
7984 | $result = Multibyte::strtoupper($string); |
||
7985 | $expected = 'Ń'; |
||
7986 | $this->assertEquals($expected, $result); |
||
7987 | |||
7988 | $string = 'ņ'; |
||
7989 | $result = Multibyte::strtoupper($string); |
||
7990 | $expected = 'Ņ'; |
||
7991 | $this->assertEquals($expected, $result); |
||
7992 | |||
7993 | $string = 'ň'; |
||
7994 | $result = Multibyte::strtoupper($string); |
||
7995 | $expected = 'Ň'; |
||
7996 | $this->assertEquals($expected, $result); |
||
7997 | |||
7998 | $string = 'ŋ'; |
||
7999 | $result = Multibyte::strtoupper($string); |
||
8000 | $expected = 'Ŋ'; |
||
8001 | $this->assertEquals($expected, $result); |
||
8002 | |||
8003 | $string = 'ō'; |
||
8004 | $result = Multibyte::strtoupper($string); |
||
8005 | $expected = 'Ō'; |
||
8006 | $this->assertEquals($expected, $result); |
||
8007 | |||
8008 | $string = 'ŏ'; |
||
8009 | $result = Multibyte::strtoupper($string); |
||
8010 | $expected = 'Ŏ'; |
||
8011 | $this->assertEquals($expected, $result); |
||
8012 | |||
8013 | $string = 'ő'; |
||
8014 | $result = Multibyte::strtoupper($string); |
||
8015 | $expected = 'Ő'; |
||
8016 | $this->assertEquals($expected, $result); |
||
8017 | |||
8018 | $string = 'œ'; |
||
8019 | $result = Multibyte::strtoupper($string); |
||
8020 | $expected = 'Œ'; |
||
8021 | $this->assertEquals($expected, $result); |
||
8022 | |||
8023 | $string = 'ŕ'; |
||
8024 | $result = Multibyte::strtoupper($string); |
||
8025 | $expected = 'Ŕ'; |
||
8026 | $this->assertEquals($expected, $result); |
||
8027 | |||
8028 | $string = 'ŗ'; |
||
8029 | $result = Multibyte::strtoupper($string); |
||
8030 | $expected = 'Ŗ'; |
||
8031 | $this->assertEquals($expected, $result); |
||
8032 | |||
8033 | $string = 'ř'; |
||
8034 | $result = Multibyte::strtoupper($string); |
||
8035 | $expected = 'Ř'; |
||
8036 | $this->assertEquals($expected, $result); |
||
8037 | |||
8038 | $string = 'ś'; |
||
8039 | $result = Multibyte::strtoupper($string); |
||
8040 | $expected = 'Ś'; |
||
8041 | $this->assertEquals($expected, $result); |
||
8042 | |||
8043 | $string = 'ŝ'; |
||
8044 | $result = Multibyte::strtoupper($string); |
||
8045 | $expected = 'Ŝ'; |
||
8046 | $this->assertEquals($expected, $result); |
||
8047 | |||
8048 | $string = 'ş'; |
||
8049 | $result = Multibyte::strtoupper($string); |
||
8050 | $expected = 'Ş'; |
||
8051 | $this->assertEquals($expected, $result); |
||
8052 | |||
8053 | $string = 'š'; |
||
8054 | $result = Multibyte::strtoupper($string); |
||
8055 | $expected = 'Š'; |
||
8056 | $this->assertEquals($expected, $result); |
||
8057 | |||
8058 | $string = 'ţ'; |
||
8059 | $result = Multibyte::strtoupper($string); |
||
8060 | $expected = 'Ţ'; |
||
8061 | $this->assertEquals($expected, $result); |
||
8062 | |||
8063 | $string = 'ť'; |
||
8064 | $result = Multibyte::strtoupper($string); |
||
8065 | $expected = 'Ť'; |
||
8066 | $this->assertEquals($expected, $result); |
||
8067 | |||
8068 | $string = 'ŧ'; |
||
8069 | $result = Multibyte::strtoupper($string); |
||
8070 | $expected = 'Ŧ'; |
||
8071 | $this->assertEquals($expected, $result); |
||
8072 | |||
8073 | $string = 'ũ'; |
||
8074 | $result = Multibyte::strtoupper($string); |
||
8075 | $expected = 'Ũ'; |
||
8076 | $this->assertEquals($expected, $result); |
||
8077 | |||
8078 | $string = 'ū'; |
||
8079 | $result = Multibyte::strtoupper($string); |
||
8080 | $expected = 'Ū'; |
||
8081 | $this->assertEquals($expected, $result); |
||
8082 | |||
8083 | $string = 'ŭ'; |
||
8084 | $result = Multibyte::strtoupper($string); |
||
8085 | $expected = 'Ŭ'; |
||
8086 | $this->assertEquals($expected, $result); |
||
8087 | |||
8088 | $string = 'ů'; |
||
8089 | $result = Multibyte::strtoupper($string); |
||
8090 | $expected = 'Ů'; |
||
8091 | $this->assertEquals($expected, $result); |
||
8092 | |||
8093 | $string = 'ű'; |
||
8094 | $result = Multibyte::strtoupper($string); |
||
8095 | $expected = 'Ű'; |
||
8096 | $this->assertEquals($expected, $result); |
||
8097 | |||
8098 | $string = 'ų'; |
||
8099 | $result = Multibyte::strtoupper($string); |
||
8100 | $expected = 'Ų'; |
||
8101 | $this->assertEquals($expected, $result); |
||
8102 | |||
8103 | $string = 'ŵ'; |
||
8104 | $result = Multibyte::strtoupper($string); |
||
8105 | $expected = 'Ŵ'; |
||
8106 | $this->assertEquals($expected, $result); |
||
8107 | |||
8108 | $string = 'ŷ'; |
||
8109 | $result = Multibyte::strtoupper($string); |
||
8110 | $expected = 'Ŷ'; |
||
8111 | $this->assertEquals($expected, $result); |
||
8112 | |||
8113 | $string = 'ź'; |
||
8114 | $result = Multibyte::strtoupper($string); |
||
8115 | $expected = 'Ź'; |
||
8116 | $this->assertEquals($expected, $result); |
||
8117 | |||
8118 | $string = 'ż'; |
||
8119 | $result = Multibyte::strtoupper($string); |
||
8120 | $expected = 'Ż'; |
||
8121 | $this->assertEquals($expected, $result); |
||
8122 | |||
8123 | $string = 'ž'; |
||
8124 | $result = Multibyte::strtoupper($string); |
||
8125 | $expected = 'Ž'; |
||
8126 | $this->assertEquals($expected, $result); |
||
8127 | |||
8128 | $string = 'āăąćĉċčďđēĕėęěĝğġģĥħĩīĭįijĵķĺļľŀłńņňŋōŏőœŕŗřśŝşšţťŧũūŭůűųŵŷźżž'; |
||
8129 | $result = Multibyte::strtoupper($string); |
||
8130 | $expected = 'ĀĂĄĆĈĊČĎĐĒĔĖĘĚĜĞĠĢĤĦĨĪĬĮIJĴĶĹĻĽĿŁŃŅŇŊŌŎŐŒŔŖŘŚŜŞŠŢŤŦŨŪŬŮŰŲŴŶŹŻŽ'; |
||
8131 | $this->assertEquals($expected, $result); |
||
8132 | |||
8133 | $string = 'Ĥēĺļŏ, Ŵőřļď!'; |
||
8134 | $result = Multibyte::strtoupper($string); |
||
8135 | $expected = 'ĤĒĹĻŎ, ŴŐŘĻĎ!'; |
||
8136 | $this->assertEquals($expected, $result); |
||
8137 | |||
8138 | $string = 'ἀι'; |
||
8139 | $result = mb_strtoupper($string); |
||
8140 | $expected = 'ἈΙ'; |
||
8141 | $this->assertEquals($expected, $result); |
||
8142 | |||
8143 | $string = 'ἀι'; |
||
8144 | $result = Multibyte::strtoupper($string); |
||
8145 | $expected = 'ἈΙ'; |
||
8146 | $this->assertEquals($expected, $result); |
||
8147 | |||
8148 | $string = 'ԁԃԅԇԉԋԍԏԐԒ'; |
||
8149 | $result = Multibyte::strtoupper($string); |
||
8150 | $expected = 'ԀԂԄԆԈԊԌԎԐԒ'; |
||
8151 | $this->assertEquals($expected, $result); |
||
8152 | |||
8153 | $string = 'աբգդեզէըթժիլխծկհձղճմյնշոչպջռսվտրցւփքօֆև'; |
||
8154 | $result = Multibyte::strtoupper($string); |
||
8155 | $expected = 'ԱԲԳԴԵԶԷԸԹԺԻԼԽԾԿՀՁՂՃՄՅՆՇՈՉՊՋՌՍՎՏՐՑՒՓՔՕՖև'; |
||
8156 | $this->assertEquals($expected, $result); |
||
8157 | |||
8158 | $string = 'ႠႡႢႣႤႥႦႧႨႩႪႫႬႭႮႯႰႱႲႳႴႵႶႷႸႹႺႻႼႽႾႿჀჁჂჃჄჅ'; |
||
8159 | $result = Multibyte::strtoupper($string); |
||
8160 | $expected = 'ႠႡႢႣႤႥႦႧႨႩႪႫႬႭႮႯႰႱႲႳႴႵႶႷႸႹႺႻႼႽႾႿჀჁჂჃჄჅ'; |
||
8161 | $this->assertEquals($expected, $result); |
||
8162 | |||
8163 | $string = 'ḁḃḅḇḉḋḍḏḑḓḕḗḙḛḝḟḡḣḥḧḩḫḭḯḱḳḵḷḹḻḽḿṁṃṅṇṉṋṍṏṑṓṕṗṙṛṝṟṡṣṥṧṩṫṭṯṱṳṵṷṹṻṽṿẁẃẅẇẉẋẍẏẑẓẕẖẗẘẙẚạảấầẩẫậắằẳẵặẹẻẽếềểễệỉịọỏốồổỗộớờởỡợụủứừửữựỳỵỷỹ'; |
||
8164 | $result = Multibyte::strtoupper($string); |
||
8165 | $expected = 'ḀḂḄḆḈḊḌḎḐḒḔḖḘḚḜḞḠḢḤḦḨḪḬḮḰḲḴḶḸḺḼḾṀṂṄṆṈṊṌṎṐṒṔṖṘṚṜṞṠṢṤṦṨṪṬṮṰṲṴṶṸṺṼṾẀẂẄẆẈẊẌẎẐẒẔẖẗẘẙẚẠẢẤẦẨẪẬẮẰẲẴẶẸẺẼẾỀỂỄỆỈỊỌỎỐỒỔỖỘỚỜỞỠỢỤỦỨỪỬỮỰỲỴỶỸ'; |
||
8166 | $this->assertEquals($expected, $result); |
||
8167 | |||
8168 | $string = 'ωkåⅎ'; |
||
8169 | $result = Multibyte::strtoupper($string); |
||
8170 | $expected = 'ΩKÅℲ'; |
||
8171 | $this->assertEquals($expected, $result); |
||
8172 | |||
8173 | $string = 'ωkå'; |
||
8174 | $result = Multibyte::strtoupper($string); |
||
8175 | $expected = 'ΩKÅ'; |
||
8176 | $this->assertEquals($expected, $result); |
||
8177 | |||
8178 | $string = 'ⅰⅱⅲⅳⅴⅵⅶⅷⅸⅹⅺⅻⅼⅽⅾⅿↄ'; |
||
8179 | $result = Multibyte::strtoupper($string); |
||
8180 | $expected = 'ⅠⅡⅢⅣⅤⅥⅦⅧⅨⅩⅪⅫⅬⅭⅮⅯↃ'; |
||
8181 | $this->assertEquals($expected, $result); |
||
8182 | |||
8183 | $string = 'ⓐⓑⓒⓓⓔⓕⓖⓗⓘⓙⓚⓛⓜⓝⓞⓟⓠⓡⓢⓣⓤⓥⓦⓧⓨⓩ'; |
||
8184 | $result = Multibyte::strtoupper($string); |
||
8185 | $expected = 'ⒶⒷⒸⒹⒺⒻⒼⒽⒾⒿⓀⓁⓂⓃⓄⓅⓆⓇⓈⓉⓊⓋⓌⓍⓎⓏ'; |
||
8186 | $this->assertEquals($expected, $result); |
||
8187 | |||
8188 | $string = 'ⰰⰱⰲⰳⰴⰵⰶⰷⰸⰹⰺⰻⰼⰽⰾⰿⱀⱁⱂⱃⱄⱅⱆⱇⱈⱉⱊⱋⱌⱍⱎⱏⱐⱑⱒⱓⱔⱕⱖⱗⱘⱙⱚⱛⱜⱝⱞ'; |
||
8189 | $result = Multibyte::strtoupper($string); |
||
8190 | $expected = 'ⰀⰁⰂⰃⰄⰅⰆⰇⰈⰉⰊⰋⰌⰍⰎⰏⰐⰑⰒⰓⰔⰕⰖⰗⰘⰙⰚⰛⰜⰝⰞⰟⰠⰡⰢⰣⰤⰥⰦⰧⰨⰩⰪⰫⰬⰭⰮ'; |
||
8191 | $this->assertEquals($expected, $result); |
||
8192 | |||
8193 | $string = 'ⲁⲃⲅⲇⲉⲋⲍⲏⲑⲓⲕⲗⲙⲛⲝⲟⲡⲣⲥⲧⲩⲫⲭⲯⲱⲳⲵⲷⲹⲻⲽⲿⳁⳃⳅⳇⳉⳋⳍⳏⳑⳓⳕⳗⳙⳛⳝⳟⳡⳣ'; |
||
8194 | $result = Multibyte::strtoupper($string); |
||
8195 | $expected = 'ⲀⲂⲄⲆⲈⲊⲌⲎⲐⲒⲔⲖⲘⲚⲜⲞⲠⲢⲤⲦⲨⲪⲬⲮⲰⲲⲴⲶⲸⲺⲼⲾⳀⳂⳄⳆⳈⳊⳌⳎⳐⳒⳔⳖⳘⳚⳜⳞⳠⳢ'; |
||
8196 | $this->assertEquals($expected, $result); |
||
8197 | |||
8198 | $string = 'fffiflffifflſtstﬓﬔﬕﬖﬗ'; |
||
8199 | $result = Multibyte::strtoupper($string); |
||
8200 | $expected = 'fffiflffifflſtstﬓﬔﬕﬖﬗ'; |
||
8201 | $this->assertEquals($expected, $result); |
||
8202 | } |
||
8203 | |||
8204 | /**
|
||
8205 | * testUsingMbSubstrCount method
|
||
8206 | *
|
||
8207 | * @return void
|
||
8208 | */
|
||
8209 | public function testUsingMbSubstrCount() { |
||
8210 | $string = 'ABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789'; |
||
8211 | $find = 'F'; |
||
8212 | $result = mb_substr_count($string, $find); |
||
8213 | $expected = 1; |
||
8214 | $this->assertEquals($expected, $result); |
||
8215 | |||
8216 | $string = 'ABCDEFGHIJKLMNOPQFRSFTUVWXYZ0F12345F6789'; |
||
8217 | $find = 'F'; |
||
8218 | $result = mb_substr_count($string, $find); |
||
8219 | $expected = 5; |
||
8220 | $this->assertEquals($expected, $result); |
||
8221 | |||
8222 | $string = 'ÀÁÂÃÄÅÆÇÈÉÅÊËÌÍÎÏÐÑÒÓÔÅÕÖØÅÙÚÛÅÜÝÞ'; |
||
8223 | $find = 'Å'; |
||
8224 | $result = mb_substr_count($string, $find); |
||
8225 | $expected = 5; |
||
8226 | $this->assertEquals($expected, $result); |
||
8227 | |||
8228 | $string = 'ÀÁÙÚÂÃÄÅÆÇÈÙÚÉÊËÌÍÎÏÐÑÒÓÔÕÖØÅÙÚÛÜÝÞÙÚ'; |
||
8229 | $find = 'ÙÚ'; |
||
8230 | $result = mb_substr_count($string, $find); |
||
8231 | $expected = 4; |
||
8232 | $this->assertEquals($expected, $result); |
||
8233 | |||
8234 | $string = 'ÀÁÂÃÄÅÆÇÈÉÊÅËÌÍÎÏÐÑÒÓÔÕÅÖØÅÙÚÅÛÜÅÝÞÅ'; |
||
8235 | $find = 'Å'; |
||
8236 | $result = mb_substr_count($string, $find); |
||
8237 | $expected = 7; |
||
8238 | $this->assertEquals($expected, $result); |
||
8239 | |||
8240 | $string = 'ĊĀĂĄĆĈĊČĎĐĒĔĖĊĘĚĜĞĠĢĤĦĨĪĬĮĊIJĴĶĹĻĽĿŁŃŅŇŊŌĊŎŐŒŔŖŘŚŜŞŠŢĊŤŦŨŪŬŮŰĊŲŴŶŹŻŽ'; |
||
8241 | $find = 'Ċ'; |
||
8242 | $result = mb_substr_count($string, $find); |
||
8243 | $expected = 7; |
||
8244 | $this->assertEquals($expected, $result); |
||
8245 | |||
8246 | $string = 'ĀĂĄĆĈĊČĎĐĒĔĖĘĚĜĊĞĠĢĤĦĨĪĬĮIJĴĶĹĻĽĿŁĊŃŅĊŇŊŌŎŐŒŔŖĊŘŚŜŞŠŢŤŦŨŪŬŮŰŲŴŶŹŻŽ'; |
||
8247 | $find = 'Ċ'; |
||
8248 | $result = mb_substr_count($string, $find); |
||
8249 | $expected = 5; |
||
8250 | $this->assertEquals($expected, $result); |
||
8251 | |||
8252 | $string = '!"#$%&\'()*+,-./012F34567F89:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghiFjklmnopqFrstuvwFxyz{|}~'; |
||
8253 | $find = 'F'; |
||
8254 | $result = mb_substr_count($string, $find); |
||
8255 | $expected = 6; |
||
8256 | $this->assertEquals($expected, $result); |
||
8257 | |||
8258 | $string = '¡¢£¤¥µ¦§¨©ª«¬®¯°±²³´µ¶·¸¹º»¼½¾¿ÀÁµÂõÄÅÆǵÈ'; |
||
8259 | $find = 'µ'; |
||
8260 | $result = mb_substr_count($string, $find); |
||
8261 | $expected = 5; |
||
8262 | $this->assertEquals($expected, $result); |
||
8263 | |||
8264 | $string = 'ÉÊËÌÍÎÏÐÑÒÓÔÕÖ×ØÙÚÛÜÝÞßàáâãäåæçèéêëìíîïðñòóôÕÖõö÷øùúûüýþÿĀāĂ㥹ĆćĈĉÕÖĊċČčĎďĐđĒēĔĕĖėĘęĚěĜĝÕÖĞğĠġĢģĤĥĦÕÖħĨĩĪīĬ'; |
||
8265 | $find = 'ÕÖ'; |
||
8266 | $result = mb_substr_count($string, $find); |
||
8267 | $expected = 5; |
||
8268 | $this->assertEquals($expected, $result); |
||
8269 | |||
8270 | $string = 'ĭĮįİıIJijĴĵĶķĸĹĺĻļĽľĿŀŁłŃńŅņŇňʼnŊŋŌōĵĶķĸĹŎŏŐőŒœŔŕŖŗŘřŚśŜŝŞşŠšĵĶķĸĹŢţŤťŦŧŨũŪūŬŭŮůŰűŲųĵĶķĸĹŴŵŶŷŸŹźŻżŽžſƀƁƂƃƄƅƆƇƈƉƊƋƌƍƎƏƐ'; |
||
8271 | $find = 'ĵĶķĸĹ'; |
||
8272 | $result = mb_substr_count($string, $find); |
||
8273 | $expected = 4; |
||
8274 | $this->assertEquals($expected, $result); |
||
8275 | |||
8276 | $string = 'ƑƒƓƔƕƖƸƗƘƙƚƛƜƝƞƟƠơƢƣƤƥƦƧƨƩƪƫƬƭƮƯưƱƲƳƴƵƶƷƸƹƺƻƼƽƾƿǀǁǂǃDŽDždžLJLjljNJƸNjnjǍǎǏǐǑǒǓƸǔǕǖǗǘǙǚƸǛǜǝǞǟǠǡǢǣǤǥǦǧǨǩǪǫǬǭǮǯǰDZDzdzǴ'; |
||
8277 | $find = 'Ƹ'; |
||
8278 | $result = mb_substr_count($string, $find); |
||
8279 | $expected = 5; |
||
8280 | $this->assertEquals($expected, $result); |
||
8281 | |||
8282 | $string = 'ƑƒƓƔƕƖƗƘƙƚƛƜƝƞƟƹƠơƢƣƤƥƦƧƨƩƹƪƫƬƭƮƯưƱƲƳƴƹƵƶƷƸƹƺƻƼƽƾƿǀǁǂƹǃDŽDždžLJLjljNJNjnjǍǎǏǐǑǒǓǔǕǖǗǘǙǚǛǜǝǞǟǠǡǢǣǤǥǦǧǨǩǪǫǬǭǮǯǰDZDzdzǴ'; |
||
8283 | $find = 'ƹ'; |
||
8284 | $result = mb_substr_count($string, $find); |
||
8285 | $expected = 5; |
||
8286 | $this->assertEquals($expected, $result); |
||
8287 | |||
8288 | $string = 'əɚɛɜɝɞʀɟɠɡɢɣɤɥɦɧɨɩɪɫɬɭɮɯɰɱɲɳɴɵɶɷɸɹɺɻɼɽɾɿʀʁʂʃʄʅʆʀʇʈʉʊʋʌʍʎʏʐʑʒʓʔʕʖʗʘʙʚʛʜʝʞʟʠʡʢʣʤʥʦʧʀʨʩʪʫʬʭʮʯʰʱʲʳʴʵʶʷʸʹʺʀʻʼ'; |
||
8289 | $find = 'ʀ'; |
||
8290 | $result = mb_substr_count($string, $find); |
||
8291 | $expected = 5; |
||
8292 | $this->assertEquals($expected, $result); |
||
8293 | |||
8294 | $string = 'ЀЁЂЃЄЅІЇЈЉЊЋЌЍЇЎЏАБВГДЕЖЗИЙКЛ'; |
||
8295 | $find = 'Ї'; |
||
8296 | $result = mb_substr_count($string, $find); |
||
8297 | $expected = 2; |
||
8298 | $this->assertEquals($expected, $result); |
||
8299 | |||
8300 | $string = 'МНОПРСРТУФХЦЧШЩЪЫЬРЭЮЯабРвгдежзийклРмнопрстуфхцчшщъыь'; |
||
8301 | $find = 'Р'; |
||
8302 | $result = mb_substr_count($string, $find); |
||
8303 | $expected = 5; |
||
8304 | $this->assertEquals($expected, $result); |
||
8305 | |||
8306 | $string = 'МНОПРСрТУФХЦЧШЩЪЫрЬЭЮЯабвгдежзийклмнопррстуфхцчшщъыь'; |
||
8307 | $find = 'р'; |
||
8308 | $result = mb_substr_count($string, $find); |
||
8309 | $expected = 4; |
||
8310 | $this->assertEquals($expected, $result); |
||
8311 | |||
8312 | $string = 'فنقكلنمنهونىينًٌٍَُ'; |
||
8313 | $find = 'ن'; |
||
8314 | $result = mb_substr_count($string, $find); |
||
8315 | $expected = 5; |
||
8316 | $this->assertEquals($expected, $result); |
||
8317 | |||
8318 | $string = '✰✱✲✳✿✴✵✶✷✸✿✹✺✻✼✽✾✿❀❁❂❃❄❅❆✿❇❈❉❊❋❌❍❎❏❐❑❒❓❔❕❖❗❘❙❚❛❜❝❞'; |
||
8319 | $find = '✿'; |
||
8320 | $result = mb_substr_count($string, $find); |
||
8321 | $expected = 4; |
||
8322 | $this->assertEquals($expected, $result); |
||
8323 | |||
8324 | $string = '⺀⺁⺂⺃⺄⺅⺆⺇⺈⺉⺐⺊⺋⺌⺍⺎⺏⺐⺑⺒⺓⺔⺕⺖⺗⺘⺙⺛⺜⺝⺞⺟⺠⺡⺢⺣⺤⺥⺦⺧⺨⺐⺩⺪⺫⺬⺭⺮⺯⺰⺱⺲⺳⺴⺵⺶⺷⺸⺹⺺⺻⺼⺽⺾⺿⻀⻁⻂⻃⻄⻅⻆⻇⻈⻉⺐⻊⻋⻌⻍⻎⻏⻐⻑⻒⻓⻔⻕⻖⻗⻘⻙⻚⻛⻜⻝⻞⻟⻠'; |
||
8325 | $find = '⺐'; |
||
8326 | $result = mb_substr_count($string, $find); |
||
8327 | $expected = 4; |
||
8328 | $this->assertEquals($expected, $result); |
||
8329 | |||
8330 | $string = '⽅⽆⽇⽈⽉⽊⽋⽌⽍⽎⽏⽐⽑⽒⽓⽔⽕⽖⽤⽗⽘⽙⽚⽛⽜⽝⽞⽟⽠⽡⽢⽣⽤⽥⽦⽧⽨⽩⽪⽫⽬⽭⽮⽯⽰⽱⽲⽳⽴⽵⽤⽶⽷⽸⽹⽺⽻⽼⽽⽾⽿'; |
||
8331 | $find = '⽤'; |
||
8332 | $result = mb_substr_count($string, $find); |
||
8333 | $expected = 3; |
||
8334 | $this->assertEquals($expected, $result); |
||
8335 | |||
8336 | $string = '눡눢눣눤눥눦눺눻눼눧눨눩눪눫눬눭눮눯눰눱눲눳눴눵눶눷눸눹눺눻눼눽눾눿뉀뉁뉂뉃뉄뉅뉆뉇뉈뉉뉊뉋뉌뉍뉎뉏뉐뉑뉒뉓뉔뉕눺눻눼뉖뉗뉘뉙뉚뉛뉜뉝눺눻눼뉞뉟뉠뉡뉢뉣뉤뉥뉦뉧뉨뉩뉪뉫뉬뉭뉮뉯뉰뉱뉲뉳뉴뉵뉶뉷뉸뉹뉺뉻뉼뉽뉾뉿늀늁늂늃늄'; |
||
8337 | $find = '눺눻눼'; |
||
8338 | $result = mb_substr_count($string, $find); |
||
8339 | $expected = 4; |
||
8340 | $this->assertEquals($expected, $result); |
||
8341 | |||
8342 | $string = 'ﺞﺟﺠﺡﹰﹱﹲﹳﹴﹶﹷﹸﹹﹺﹻﹼﹽﹾﹿﺀﺁﺂﺃﺄﺅﺞﺟﺠﺡﺆﺇﺞﺟﺠﺡﺈﺉﺊﺋﺌﺍﺎﺏﺐﺑﺒﺓﺔﺕﺖﺗﺘﺙﺚﺛﺜﺝﺞﺟﺠﺡﺢﺣﺤﺥﺦﺧﺨﺩﺪﺫﺬﺭﺮﺯﺰ'; |
||
8343 | $find = 'ﺞﺟﺠﺡ'; |
||
8344 | $result = mb_substr_count($string, $find); |
||
8345 | $expected = 4; |
||
8346 | $this->assertEquals($expected, $result); |
||
8347 | |||
8348 | $string = 'ﺱﺲﺳﺴﺵﺶﺷﺸﺹﺺﺻﺼﻞﺽﺾﺿﻀﻁﻂﻃﻄﻅﻆﻇﻈﻉﻊﻋﻌﻍﻎﻏﻐﻑﻒﻓﻔﻞﻕﻖﻗﻘﻙﻚﻛﻜﻝﻞﻟﻠﻡﻢﻣﻤﻥﻦﻧﻨﻩﻪﻫﻬﻭﻮﻯﻰﻱﻲﻳﻴﻵﻶﻷﻞﻸﻹﻺﻞﻻﻼ'; |
||
8349 | $find = 'ﻞ'; |
||
8350 | $result = mb_substr_count($string, $find); |
||
8351 | $expected = 5; |
||
8352 | $this->assertEquals($expected, $result); |
||
8353 | |||
8354 | $string = 'abcdkefghijklmnopqrstuvwxkyz'; |
||
8355 | $find = 'k'; |
||
8356 | $result = mb_substr_count($string, $find); |
||
8357 | $expected = 3; |
||
8358 | $this->assertEquals($expected, $result); |
||
8359 | |||
8360 | $string = 'abklmcdefghijklmnopqrstuvklmwxyz'; |
||
8361 | $find = 'klm'; |
||
8362 | $result = mb_substr_count($string, $find); |
||
8363 | $expected = 3; |
||
8364 | $this->assertEquals($expected, $result); |
||
8365 | |||
8366 | $string = 'abcdppefghijklmnoppqrstuvwxyz'; |
||
8367 | $find = 'ppe'; |
||
8368 | $result = mb_substr_count($string, $find); |
||
8369 | $expected = 1; |
||
8370 | $this->assertEquals($expected, $result); |
||
8371 | |||
8372 | $string = '。「」、・ヲァィゥェォャュョッーアイウエオカキク'; |
||
8373 | $find = 'ア'; |
||
8374 | $result = mb_substr_count($string, $find); |
||
8375 | $expected = 1; |
||
8376 | $this->assertEquals($expected, $result); |
||
8377 | |||
8378 | $string = 'ケコサシスセソタチツテトナニヌネノハヒフヘホマミムメモヤユヨラリルレロワン゙'; |
||
8379 | $find = 'ハ'; |
||
8380 | $result = mb_substr_count($string, $find); |
||
8381 | $expected = 1; |
||
8382 | $this->assertEquals($expected, $result); |
||
8383 | |||
8384 | $string = 'Ĥēĺļŏ, Ŵőřļď!'; |
||
8385 | $find = 'ő'; |
||
8386 | $result = mb_substr_count($string, $find); |
||
8387 | $expected = 1; |
||
8388 | $this->assertEquals($expected, $result); |
||
8389 | |||
8390 | $string = 'Ĥēĺļŏ, Ŵőřļď!'; |
||
8391 | $find = 'ĺļ'; |
||
8392 | $result = mb_substr_count($string, $find); |
||
8393 | $expected = 1; |
||
8394 | $this->assertEquals($expected, $result); |
||
8395 | |||
8396 | $string = 'Hello, World!'; |
||
8397 | $find = 'o'; |
||
8398 | $result = mb_substr_count($string, $find); |
||
8399 | $expected = 2; |
||
8400 | $this->assertEquals($expected, $result); |
||
8401 | |||
8402 | $string = 'Hello, World!'; |
||
8403 | $find = 'rl'; |
||
8404 | $result = mb_substr_count($string, $find); |
||
8405 | $expected = 1; |
||
8406 | $this->assertEquals($expected, $result); |
||
8407 | |||
8408 | $string = 'čini'; |
||
8409 | $find = 'n'; |
||
8410 | $result = mb_substr_count($string, $find); |
||
8411 | $expected = 1; |
||
8412 | $this->assertEquals($expected, $result); |
||
8413 | |||
8414 | $string = 'ničiničiini'; |
||
8415 | $find = 'n'; |
||
8416 | $result = mb_substr_count($string, $find); |
||
8417 | $expected = 3; |
||
8418 | $this->assertEquals($expected, $result); |
||
8419 | |||
8420 | $string = 'moći'; |
||
8421 | $find = 'ć'; |
||
8422 | $result = mb_substr_count($string, $find); |
||
8423 | $expected = 1; |
||
8424 | $this->assertEquals($expected, $result); |
||
8425 | |||
8426 | $string = 'moćimoćimoćmćioći'; |
||
8427 | $find = 'ći'; |
||
8428 | $result = mb_substr_count($string, $find); |
||
8429 | $expected = 4; |
||
8430 | $this->assertEquals($expected, $result); |
||
8431 | |||
8432 | $string = 'državni'; |
||
8433 | $find = 'ž'; |
||
8434 | $result = mb_substr_count($string, $find); |
||
8435 | $expected = 1; |
||
8436 | $this->assertEquals($expected, $result); |
||
8437 | |||
8438 | $string = '把百度设为首页'; |
||
8439 | $find = '设'; |
||
8440 | $result = mb_substr_count($string, $find); |
||
8441 | $expected = 1; |
||
8442 | $this->assertEquals($expected, $result); |
||
8443 | |||
8444 | $string = '一二三周永龍'; |
||
8445 | $find = '周'; |
||
8446 | $result = mb_substr_count($string, $find); |
||
8447 | $expected = 1; |
||
8448 | $this->assertEquals($expected, $result); |
||
8449 | |||
8450 | $string = 'Ĥēĺļŏ, Ŵőřļď!'; |
||
8451 | $find = 'H'; |
||
8452 | $result = mb_substr_count($string, $find); |
||
8453 | $expected = 0; |
||
8454 | $this->assertEquals($expected, $result); |
||
8455 | } |
||
8456 | |||
8457 | /**
|
||
8458 | * testMultibyteSubstrCount method
|
||
8459 | *
|
||
8460 | * @return void
|
||
8461 | */
|
||
8462 | public function testMultibyteSubstrCount() { |
||
8463 | $string = 'ABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789'; |
||
8464 | $find = 'F'; |
||
8465 | $result = Multibyte::substrCount($string, $find); |
||
8466 | $expected = 1; |
||
8467 | $this->assertEquals($expected, $result); |
||
8468 | |||
8469 | $string = 'ABCDEFGHIJKLMNOPQFRSFTUVWXYZ0F12345F6789'; |
||
8470 | $find = 'F'; |
||
8471 | $result = Multibyte::substrCount($string, $find); |
||
8472 | $expected = 5; |
||
8473 | $this->assertEquals($expected, $result); |
||
8474 | |||
8475 | $string = 'ÀÁÂÃÄÅÆÇÈÉÅÊËÌÍÎÏÐÑÒÓÔÅÕÖØÅÙÚÛÅÜÝÞ'; |
||
8476 | $find = 'Å'; |
||
8477 | $result = Multibyte::substrCount($string, $find); |
||
8478 | $expected = 5; |
||
8479 | $this->assertEquals($expected, $result); |
||
8480 | |||
8481 | $string = 'ÀÁÙÚÂÃÄÅÆÇÈÙÚÉÊËÌÍÎÏÐÑÒÓÔÕÖØÅÙÚÛÜÝÞÙÚ'; |
||
8482 | $find = 'ÙÚ'; |
||
8483 | $result = Multibyte::substrCount($string, $find); |
||
8484 | $expected = 4; |
||
8485 | $this->assertEquals($expected, $result); |
||
8486 | |||
8487 | $string = 'ÀÁÂÃÄÅÆÇÈÉÊÅËÌÍÎÏÐÑÒÓÔÕÅÖØÅÙÚÅÛÜÅÝÞÅ'; |
||
8488 | $find = 'Å'; |
||
8489 | $result = Multibyte::substrCount($string, $find); |
||
8490 | $expected = 7; |
||
8491 | $this->assertEquals($expected, $result); |
||
8492 | |||
8493 | $string = 'ĊĀĂĄĆĈĊČĎĐĒĔĖĊĘĚĜĞĠĢĤĦĨĪĬĮĊIJĴĶĹĻĽĿŁŃŅŇŊŌĊŎŐŒŔŖŘŚŜŞŠŢĊŤŦŨŪŬŮŰĊŲŴŶŹŻŽ'; |
||
8494 | $find = 'Ċ'; |
||
8495 | $result = Multibyte::substrCount($string, $find); |
||
8496 | $expected = 7; |
||
8497 | $this->assertEquals($expected, $result); |
||
8498 | |||
8499 | $string = 'ĀĂĄĆĈĊČĎĐĒĔĖĘĚĜĊĞĠĢĤĦĨĪĬĮIJĴĶĹĻĽĿŁĊŃŅĊŇŊŌŎŐŒŔŖĊŘŚŜŞŠŢŤŦŨŪŬŮŰŲŴŶŹŻŽ'; |
||
8500 | $find = 'Ċ'; |
||
8501 | $result = Multibyte::substrCount($string, $find); |
||
8502 | $expected = 5; |
||
8503 | $this->assertEquals($expected, $result); |
||
8504 | |||
8505 | $string = '!"#$%&\'()*+,-./012F34567F89:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghiFjklmnopqFrstuvwFxyz{|}~'; |
||
8506 | $find = 'F'; |
||
8507 | $result = Multibyte::substrCount($string, $find); |
||
8508 | $expected = 6; |
||
8509 | $this->assertEquals($expected, $result); |
||
8510 | |||
8511 | $string = '¡¢£¤¥µ¦§¨©ª«¬®¯°±²³´µ¶·¸¹º»¼½¾¿ÀÁµÂõÄÅÆǵÈ'; |
||
8512 | $find = 'µ'; |
||
8513 | $result = Multibyte::substrCount($string, $find); |
||
8514 | $expected = 5; |
||
8515 | $this->assertEquals($expected, $result); |
||
8516 | |||
8517 | $string = 'ÉÊËÌÍÎÏÐÑÒÓÔÕÖ×ØÙÚÛÜÝÞßàáâãäåæçèéêëìíîïðñòóôÕÖõö÷øùúûüýþÿĀāĂ㥹ĆćĈĉÕÖĊċČčĎďĐđĒēĔĕĖėĘęĚěĜĝÕÖĞğĠġĢģĤĥĦÕÖħĨĩĪīĬ'; |
||
8518 | $find = 'ÕÖ'; |
||
8519 | $result = Multibyte::substrCount($string, $find); |
||
8520 | $expected = 5; |
||
8521 | $this->assertEquals($expected, $result); |
||
8522 | |||
8523 | $string = 'ĭĮįİıIJijĴĵĶķĸĹĺĻļĽľĿŀŁłŃńŅņŇňʼnŊŋŌōĵĶķĸĹŎŏŐőŒœŔŕŖŗŘřŚśŜŝŞşŠšĵĶķĸĹŢţŤťŦŧŨũŪūŬŭŮůŰűŲųĵĶķĸĹŴŵŶŷŸŹźŻżŽžſƀƁƂƃƄƅƆƇƈƉƊƋƌƍƎƏƐ'; |
||
8524 | $find = 'ĵĶķĸĹ'; |
||
8525 | $result = Multibyte::substrCount($string, $find); |
||
8526 | $expected = 4; |
||
8527 | $this->assertEquals($expected, $result); |
||
8528 | |||
8529 | $string = 'ƑƒƓƔƕƖƸƗƘƙƚƛƜƝƞƟƠơƢƣƤƥƦƧƨƩƪƫƬƭƮƯưƱƲƳƴƵƶƷƸƹƺƻƼƽƾƿǀǁǂǃDŽDždžLJLjljNJƸNjnjǍǎǏǐǑǒǓƸǔǕǖǗǘǙǚƸǛǜǝǞǟǠǡǢǣǤǥǦǧǨǩǪǫǬǭǮǯǰDZDzdzǴ'; |
||
8530 | $find = 'Ƹ'; |
||
8531 | $result = Multibyte::substrCount($string, $find); |
||
8532 | $expected = 5; |
||
8533 | $this->assertEquals($expected, $result); |
||
8534 | |||
8535 | $string = 'ƑƒƓƔƕƖƗƘƙƚƛƜƝƞƟƹƠơƢƣƤƥƦƧƨƩƹƪƫƬƭƮƯưƱƲƳƴƹƵƶƷƸƹƺƻƼƽƾƿǀǁǂƹǃDŽDždžLJLjljNJNjnjǍǎǏǐǑǒǓǔǕǖǗǘǙǚǛǜǝǞǟǠǡǢǣǤǥǦǧǨǩǪǫǬǭǮǯǰDZDzdzǴ'; |
||
8536 | $find = 'ƹ'; |
||
8537 | $result = Multibyte::substrCount($string, $find); |
||
8538 | $expected = 5; |
||
8539 | $this->assertEquals($expected, $result); |
||
8540 | |||
8541 | $string = 'əɚɛɜɝɞʀɟɠɡɢɣɤɥɦɧɨɩɪɫɬɭɮɯɰɱɲɳɴɵɶɷɸɹɺɻɼɽɾɿʀʁʂʃʄʅʆʀʇʈʉʊʋʌʍʎʏʐʑʒʓʔʕʖʗʘʙʚʛʜʝʞʟʠʡʢʣʤʥʦʧʀʨʩʪʫʬʭʮʯʰʱʲʳʴʵʶʷʸʹʺʀʻʼ'; |
||
8542 | $find = 'ʀ'; |
||
8543 | $result = Multibyte::substrCount($string, $find); |
||
8544 | $expected = 5; |
||
8545 | $this->assertEquals($expected, $result); |
||
8546 | |||
8547 | $string = 'ЀЁЂЃЄЅІЇЈЉЊЋЌЍЇЎЏАБВГДЕЖЗИЙКЛ'; |
||
8548 | $find = 'Ї'; |
||
8549 | $result = Multibyte::substrCount($string, $find); |
||
8550 | $expected = 2; |
||
8551 | $this->assertEquals($expected, $result); |
||
8552 | |||
8553 | $string = 'МНОПРСРТУФХЦЧШЩЪЫЬРЭЮЯабРвгдежзийклРмнопрстуфхцчшщъыь'; |
||
8554 | $find = 'Р'; |
||
8555 | $result = Multibyte::substrCount($string, $find); |
||
8556 | $expected = 5; |
||
8557 | $this->assertEquals($expected, $result); |
||
8558 | |||
8559 | $string = 'МНОПРСрТУФХЦЧШЩЪЫрЬЭЮЯабвгдежзийклмнопррстуфхцчшщъыь'; |
||
8560 | $find = 'р'; |
||
8561 | $result = Multibyte::substrCount($string, $find); |
||
8562 | $expected = 4; |
||
8563 | $this->assertEquals($expected, $result); |
||
8564 | |||
8565 | $string = 'فنقكلنمنهونىينًٌٍَُ'; |
||
8566 | $find = 'ن'; |
||
8567 | $result = Multibyte::substrCount($string, $find); |
||
8568 | $expected = 5; |
||
8569 | $this->assertEquals($expected, $result); |
||
8570 | |||
8571 | $string = '✰✱✲✳✿✴✵✶✷✸✿✹✺✻✼✽✾✿❀❁❂❃❄❅❆✿❇❈❉❊❋❌❍❎❏❐❑❒❓❔❕❖❗❘❙❚❛❜❝❞'; |
||
8572 | $find = '✿'; |
||
8573 | $result = Multibyte::substrCount($string, $find); |
||
8574 | $expected = 4; |
||
8575 | $this->assertEquals($expected, $result); |
||
8576 | |||
8577 | $string = '⺀⺁⺂⺃⺄⺅⺆⺇⺈⺉⺐⺊⺋⺌⺍⺎⺏⺐⺑⺒⺓⺔⺕⺖⺗⺘⺙⺛⺜⺝⺞⺟⺠⺡⺢⺣⺤⺥⺦⺧⺨⺐⺩⺪⺫⺬⺭⺮⺯⺰⺱⺲⺳⺴⺵⺶⺷⺸⺹⺺⺻⺼⺽⺾⺿⻀⻁⻂⻃⻄⻅⻆⻇⻈⻉⺐⻊⻋⻌⻍⻎⻏⻐⻑⻒⻓⻔⻕⻖⻗⻘⻙⻚⻛⻜⻝⻞⻟⻠'; |
||
8578 | $find = '⺐'; |
||
8579 | $result = Multibyte::substrCount($string, $find); |
||
8580 | $expected = 4; |
||
8581 | $this->assertEquals($expected, $result); |
||
8582 | |||
8583 | $string = '⽅⽆⽇⽈⽉⽊⽋⽌⽍⽎⽏⽐⽑⽒⽓⽔⽕⽖⽤⽗⽘⽙⽚⽛⽜⽝⽞⽟⽠⽡⽢⽣⽤⽥⽦⽧⽨⽩⽪⽫⽬⽭⽮⽯⽰⽱⽲⽳⽴⽵⽤⽶⽷⽸⽹⽺⽻⽼⽽⽾⽿'; |
||
8584 | $find = '⽤'; |
||
8585 | $result = Multibyte::substrCount($string, $find); |
||
8586 | $expected = 3; |
||
8587 | $this->assertEquals($expected, $result); |
||
8588 | |||
8589 | $string = '눡눢눣눤눥눦눺눻눼눧눨눩눪눫눬눭눮눯눰눱눲눳눴눵눶눷눸눹눺눻눼눽눾눿뉀뉁뉂뉃뉄뉅뉆뉇뉈뉉뉊뉋뉌뉍뉎뉏뉐뉑뉒뉓뉔뉕눺눻눼뉖뉗뉘뉙뉚뉛뉜뉝눺눻눼뉞뉟뉠뉡뉢뉣뉤뉥뉦뉧뉨뉩뉪뉫뉬뉭뉮뉯뉰뉱뉲뉳뉴뉵뉶뉷뉸뉹뉺뉻뉼뉽뉾뉿늀늁늂늃늄'; |
||
8590 | $find = '눺눻눼'; |
||
8591 | $result = Multibyte::substrCount($string, $find); |
||
8592 | $expected = 4; |
||
8593 | $this->assertEquals($expected, $result); |
||
8594 | |||
8595 | $string = 'ﺞﺟﺠﺡﹰﹱﹲﹳﹴﹶﹷﹸﹹﹺﹻﹼﹽﹾﹿﺀﺁﺂﺃﺄﺅﺞﺟﺠﺡﺆﺇﺞﺟﺠﺡﺈﺉﺊﺋﺌﺍﺎﺏﺐﺑﺒﺓﺔﺕﺖﺗﺘﺙﺚﺛﺜﺝﺞﺟﺠﺡﺢﺣﺤﺥﺦﺧﺨﺩﺪﺫﺬﺭﺮﺯﺰ'; |
||
8596 | $find = 'ﺞﺟﺠﺡ'; |
||
8597 | $result = Multibyte::substrCount($string, $find); |
||
8598 | $expected = 4; |
||
8599 | $this->assertEquals($expected, $result); |
||
8600 | |||
8601 | $string = 'ﺱﺲﺳﺴﺵﺶﺷﺸﺹﺺﺻﺼﻞﺽﺾﺿﻀﻁﻂﻃﻄﻅﻆﻇﻈﻉﻊﻋﻌﻍﻎﻏﻐﻑﻒﻓﻔﻞﻕﻖﻗﻘﻙﻚﻛﻜﻝﻞﻟﻠﻡﻢﻣﻤﻥﻦﻧﻨﻩﻪﻫﻬﻭﻮﻯﻰﻱﻲﻳﻴﻵﻶﻷﻞﻸﻹﻺﻞﻻﻼ'; |
||
8602 | $find = 'ﻞ'; |
||
8603 | $result = Multibyte::substrCount($string, $find); |
||
8604 | $expected = 5; |
||
8605 | $this->assertEquals($expected, $result); |
||
8606 | |||
8607 | $string = 'abcdkefghijklmnopqrstuvwxkyz'; |
||
8608 | $find = 'k'; |
||
8609 | $result = Multibyte::substrCount($string, $find); |
||
8610 | $expected = 3; |
||
8611 | $this->assertEquals($expected, $result); |
||
8612 | |||
8613 | $string = 'abklmcdefghijklmnopqrstuvklmwxyz'; |
||
8614 | $find = 'klm'; |
||
8615 | $result = Multibyte::substrCount($string, $find); |
||
8616 | $expected = 3; |
||
8617 | $this->assertEquals($expected, $result); |
||
8618 | |||
8619 | $string = 'abcdppefghijklmnoppqrstuvwxyz'; |
||
8620 | $find = 'ppe'; |
||
8621 | $result = Multibyte::substrCount($string, $find); |
||
8622 | $expected = 1; |
||
8623 | $this->assertEquals($expected, $result); |
||
8624 | |||
8625 | $string = '。「」、・ヲァィゥェォャュョッーアイウエオカキク'; |
||
8626 | $find = 'ア'; |
||
8627 | $result = Multibyte::substrCount($string, $find); |
||
8628 | $expected = 1; |
||
8629 | $this->assertEquals($expected, $result); |
||
8630 | |||
8631 | $string = 'ケコサシスセソタチツテトナニヌネノハヒフヘホマミムメモヤユヨラリルレロワン゙'; |
||
8632 | $find = 'ハ'; |
||
8633 | $result = Multibyte::substrCount($string, $find); |
||
8634 | $expected = 1; |
||
8635 | $this->assertEquals($expected, $result); |
||
8636 | |||
8637 | $string = 'Ĥēĺļŏ, Ŵőřļď!'; |
||
8638 | $find = 'ő'; |
||
8639 | $result = Multibyte::substrCount($string, $find); |
||
8640 | $expected = 1; |
||
8641 | $this->assertEquals($expected, $result); |
||
8642 | |||
8643 | $string = 'Ĥēĺļŏ, Ŵőřļď!'; |
||
8644 | $find = 'ĺļ'; |
||
8645 | $result = Multibyte::substrCount($string, $find); |
||
8646 | $expected = 1; |
||
8647 | $this->assertEquals($expected, $result); |
||
8648 | |||
8649 | $string = 'Hello, World!'; |
||
8650 | $find = 'o'; |
||
8651 | $result = Multibyte::substrCount($string, $find); |
||
8652 | $expected = 2; |
||
8653 | $this->assertEquals($expected, $result); |
||
8654 | |||
8655 | $string = 'Hello, World!'; |
||
8656 | $find = 'rl'; |
||
8657 | $result = Multibyte::substrCount($string, $find); |
||
8658 | $expected = 1; |
||
8659 | $this->assertEquals($expected, $result); |
||
8660 | |||
8661 | $string = 'čini'; |
||
8662 | $find = 'n'; |
||
8663 | $result = Multibyte::substrCount($string, $find); |
||
8664 | $expected = 1; |
||
8665 | $this->assertEquals($expected, $result); |
||
8666 | |||
8667 | $string = 'ničiničiini'; |
||
8668 | $find = 'n'; |
||
8669 | $result = Multibyte::substrCount($string, $find); |
||
8670 | $expected = 3; |
||
8671 | $this->assertEquals($expected, $result); |
||
8672 | |||
8673 | $string = 'moći'; |
||
8674 | $find = 'ć'; |
||
8675 | $result = Multibyte::substrCount($string, $find); |
||
8676 | $expected = 1; |
||
8677 | $this->assertEquals($expected, $result); |
||
8678 | |||
8679 | $string = 'moćimoćimoćmćioći'; |
||
8680 | $find = 'ći'; |
||
8681 | $result = Multibyte::substrCount($string, $find); |
||
8682 | $expected = 4; |
||
8683 | $this->assertEquals($expected, $result); |
||
8684 | |||
8685 | $string = 'državni'; |
||
8686 | $find = 'ž'; |
||
8687 | $result = Multibyte::substrCount($string, $find); |
||
8688 | $expected = 1; |
||
8689 | $this->assertEquals($expected, $result); |
||
8690 | |||
8691 | $string = '把百度设为首页'; |
||
8692 | $find = '设'; |
||
8693 | $result = Multibyte::substrCount($string, $find); |
||
8694 | $expected = 1; |
||
8695 | $this->assertEquals($expected, $result); |
||
8696 | |||
8697 | $string = '一二三周永龍'; |
||
8698 | $find = '周'; |
||
8699 | $result = Multibyte::substrCount($string, $find); |
||
8700 | $expected = 1; |
||
8701 | $this->assertEquals($expected, $result); |
||
8702 | |||
8703 | $string = 'Ĥēĺļŏ, Ŵőřļď!'; |
||
8704 | $find = 'H'; |
||
8705 | $result = Multibyte::substrCount($string, $find); |
||
8706 | $expected = 0; |
||
8707 | $this->assertEquals($expected, $result); |
||
8708 | } |
||
8709 | |||
8710 | /**
|
||
8711 | * testUsingMbSubstr method
|
||
8712 | *
|
||
8713 | * @return void
|
||
8714 | */
|
||
8715 | public function testUsingMbSubstr() { |
||
8716 | $string = 'ABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789'; |
||
8717 | $result = mb_substr($string, 4, 7); |
||
8718 | $expected = 'EFGHIJK'; |
||
8719 | $this->assertEquals($expected, $result); |
||
8720 | |||
8721 | $string = 'ÀÁÂÃÄÅÆÇÈÉÊËÌÍÎÏÐÑÒÓÔÕÖØÙÚÛÜÝÞ'; |
||
8722 | $result = mb_substr($string, 4, 7); |
||
8723 | $expected = 'ÄÅÆÇÈÉÊ'; |
||
8724 | $this->assertEquals($expected, $result); |
||
8725 | |||
8726 | $string = 'ĀĂĄĆĈĊČĎĐĒĔĖĘĚĜĞĠĢĤĦĨĪĬĮIJĴĶĹĻĽĿŁŃŅŇŊŌŎŐŒŔŖŘŚŜŞŠŢŤŦŨŪŬŮŰŲŴŶŹŻŽ'; |
||
8727 | $result = mb_substr($string, 4, 7); |
||
8728 | $expected = 'ĈĊČĎĐĒĔ'; |
||
8729 | $this->assertEquals($expected, $result); |
||
8730 | |||
8731 | $string = '!"#$%&\'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~'; |
||
8732 | $result = mb_substr($string, 4, 7); |
||
8733 | $expected = '%&\'()*+'; |
||
8734 | $this->assertEquals($expected, $result); |
||
8735 | |||
8736 | $string = '¡¢£¤¥¦§¨©ª«¬®¯°±²³´µ¶·¸¹º»¼½¾¿ÀÁÂÃÄÅÆÇÈ'; |
||
8737 | $result = mb_substr($string, 4); |
||
8738 | $expected = '¥¦§¨©ª«¬®¯°±²³´µ¶·¸¹º»¼½¾¿ÀÁÂÃÄÅÆÇÈ'; |
||
8739 | $this->assertEquals($expected, $result); |
||
8740 | |||
8741 | $string = 'ÉÊËÌÍÎÏÐÑÒÓÔÕÖ×ØÙÚÛÜÝÞßàáâãäåæçèéêëìíîïðñòóôõö÷øùúûüýþÿĀāĂ㥹ĆćĈĉĊċČčĎďĐđĒēĔĕĖėĘęĚěĜĝĞğĠġĢģĤĥĦħĨĩĪīĬ'; |
||
8742 | $result = mb_substr($string, 4, 7); |
||
8743 | $expected = 'ÍÎÏÐÑÒÓ'; |
||
8744 | $this->assertEquals($expected, $result); |
||
8745 | |||
8746 | $string = 'ĭĮįİıIJijĴĵĶķĸĹĺĻļĽľĿŀŁłŃńŅņŇňʼnŊŋŌōŎŏŐőŒœŔŕŖŗŘřŚśŜŝŞşŠšŢţŤťŦŧŨũŪūŬŭŮůŰűŲųŴŵŶŷŸŹźŻżŽžſƀƁƂƃƄƅƆƇƈƉƊƋƌƍƎƏƐ'; |
||
8747 | $result = mb_substr($string, 4, 7); |
||
8748 | $expected = 'ıIJijĴĵĶķ'; |
||
8749 | $this->assertEquals($expected, $result); |
||
8750 | |||
8751 | $string = 'ƑƒƓƔƕƖƗƘƙƚƛƜƝƞƟƠơƢƣƤƥƦƧƨƩƪƫƬƭƮƯưƱƲƳƴƵƶƷƸƹƺƻƼƽƾƿǀǁǂǃDŽDždžLJLjljNJNjnjǍǎǏǐǑǒǓǔǕǖǗǘǙǚǛǜǝǞǟǠǡǢǣǤǥǦǧǨǩǪǫǬǭǮǯǰDZDzdzǴ'; |
||
8752 | $result = mb_substr($string, 25); |
||
8753 | $expected = 'ƪƫƬƭƮƯưƱƲƳƴƵƶƷƸƹƺƻƼƽƾƿǀǁǂǃDŽDždžLJLjljNJNjnjǍǎǏǐǑǒǓǔǕǖǗǘǙǚǛǜǝǞǟǠǡǢǣǤǥǦǧǨǩǪǫǬǭǮǯǰDZDzdzǴ'; |
||
8754 | $this->assertEquals($expected, $result); |
||
8755 | |||
8756 | $string = 'əɚɛɜɝɞɟɠɡɢɣɤɥɦɧɨɩɪɫɬɭɮɯɰɱɲɳɴɵɶɷɸɹɺɻɼɽɾɿʀʁʂʃʄʅʆʇʈʉʊʋʌʍʎʏʐʑʒʓʔʕʖʗʘʙʚʛʜʝʞʟʠʡʢʣʤʥʦʧʨʩʪʫʬʭʮʯʰʱʲʳʴʵʶʷʸʹʺʻʼ'; |
||
8757 | $result = mb_substr($string, 3); |
||
8758 | $expected = 'ɜɝɞɟɠɡɢɣɤɥɦɧɨɩɪɫɬɭɮɯɰɱɲɳɴɵɶɷɸɹɺɻɼɽɾɿʀʁʂʃʄʅʆʇʈʉʊʋʌʍʎʏʐʑʒʓʔʕʖʗʘʙʚʛʜʝʞʟʠʡʢʣʤʥʦʧʨʩʪʫʬʭʮʯʰʱʲʳʴʵʶʷʸʹʺʻʼ'; |
||
8759 | $this->assertEquals($expected, $result); |
||
8760 | |||
8761 | $string = 'ЀЁЂЃЄЅІЇЈЉЊЋЌЍЎЏАБВГДЕЖЗИЙКЛ'; |
||
8762 | $result = mb_substr($string, 3); |
||
8763 | $expected = 'ЃЄЅІЇЈЉЊЋЌЍЎЏАБВГДЕЖЗИЙКЛ'; |
||
8764 | $this->assertEquals($expected, $result); |
||
8765 | |||
8766 | $string = 'МНОПРСТУФХЦЧШЩЪЫЬЭЮЯабвгдежзийклмнопрстуфхцчшщъыь'; |
||
8767 | $result = mb_substr($string, 3, 16); |
||
8768 | $expected = 'ПРСТУФХЦЧШЩЪЫЬЭЮ'; |
||
8769 | $this->assertEquals($expected, $result); |
||
8770 | |||
8771 | $string = 'فقكلمنهوىيًٌٍَُ'; |
||
8772 | $result = mb_substr($string, 3, 6); |
||
8773 | $expected = 'لمنهوى'; |
||
8774 | $this->assertEquals($expected, $result); |
||
8775 | |||
8776 | $string = '✰✱✲✳✴✵✶✷✸✹✺✻✼✽✾✿❀❁❂❃❄❅❆❇❈❉❊❋❌❍❎❏❐❑❒❓❔❕❖❗❘❙❚❛❜❝❞'; |
||
8777 | $result = mb_substr($string, 6, 14); |
||
8778 | $expected = '✶✷✸✹✺✻✼✽✾✿❀❁❂❃'; |
||
8779 | $this->assertEquals($expected, $result); |
||
8780 | |||
8781 | $string = '⺀⺁⺂⺃⺄⺅⺆⺇⺈⺉⺊⺋⺌⺍⺎⺏⺐⺑⺒⺓⺔⺕⺖⺗⺘⺙⺛⺜⺝⺞⺟⺠⺡⺢⺣⺤⺥⺦⺧⺨⺩⺪⺫⺬⺭⺮⺯⺰⺱⺲⺳⺴⺵⺶⺷⺸⺹⺺⺻⺼⺽⺾⺿⻀⻁⻂⻃⻄⻅⻆⻇⻈⻉⻊⻋⻌⻍⻎⻏⻐⻑⻒⻓⻔⻕⻖⻗⻘⻙⻚⻛⻜⻝⻞⻟⻠'; |
||
8782 | $result = mb_substr($string, 8, 13); |
||
8783 | $expected = '⺈⺉⺊⺋⺌⺍⺎⺏⺐⺑⺒⺓⺔'; |
||
8784 | $this->assertEquals($expected, $result); |
||
8785 | |||
8786 | $string = '⽅⽆⽇⽈⽉⽊⽋⽌⽍⽎⽏⽐⽑⽒⽓⽔⽕⽖⽗⽘⽙⽚⽛⽜⽝⽞⽟⽠⽡⽢⽣⽤⽥⽦⽧⽨⽩⽪⽫⽬⽭⽮⽯⽰⽱⽲⽳⽴⽵⽶⽷⽸⽹⽺⽻⽼⽽⽾⽿'; |
||
8787 | $result = mb_substr($string, 12, 24); |
||
8788 | $expected = '⽑⽒⽓⽔⽕⽖⽗⽘⽙⽚⽛⽜⽝⽞⽟⽠⽡⽢⽣⽤⽥⽦⽧⽨'; |
||
8789 | $this->assertEquals($expected, $result); |
||
8790 | |||
8791 | $string = '눡눢눣눤눥눦눧눨눩눪눫눬눭눮눯눰눱눲눳눴눵눶눷눸눹눺눻눼눽눾눿뉀뉁뉂뉃뉄뉅뉆뉇뉈뉉뉊뉋뉌뉍뉎뉏뉐뉑뉒뉓뉔뉕뉖뉗뉘뉙뉚뉛뉜뉝뉞뉟뉠뉡뉢뉣뉤뉥뉦뉧뉨뉩뉪뉫뉬뉭뉮뉯뉰뉱뉲뉳뉴뉵뉶뉷뉸뉹뉺뉻뉼뉽뉾뉿늀늁늂늃늄'; |
||
8792 | $result = mb_substr($string, 12, 24); |
||
8793 | $expected = '눭눮눯눰눱눲눳눴눵눶눷눸눹눺눻눼눽눾눿뉀뉁뉂뉃뉄'; |
||
8794 | $this->assertEquals($expected, $result); |
||
8795 | |||
8796 | $string = 'ﹰﹱﹲﹳﹴﹶﹷﹸﹹﹺﹻﹼﹽﹾﹿﺀﺁﺂﺃﺄﺅﺆﺇﺈﺉﺊﺋﺌﺍﺎﺏﺐﺑﺒﺓﺔﺕﺖﺗﺘﺙﺚﺛﺜﺝﺞﺟﺠﺡﺢﺣﺤﺥﺦﺧﺨﺩﺪﺫﺬﺭﺮﺯﺰ'; |
||
8797 | $result = mb_substr($string, 12); |
||
8798 | $expected = 'ﹼﹽﹾﹿﺀﺁﺂﺃﺄﺅﺆﺇﺈﺉﺊﺋﺌﺍﺎﺏﺐﺑﺒﺓﺔﺕﺖﺗﺘﺙﺚﺛﺜﺝﺞﺟﺠﺡﺢﺣﺤﺥﺦﺧﺨﺩﺪﺫﺬﺭﺮﺯﺰ'; |
||
8799 | $this->assertEquals($expected, $result); |
||
8800 | |||
8801 | $string = 'ﺱﺲﺳﺴﺵﺶﺷﺸﺹﺺﺻﺼﺽﺾﺿﻀﻁﻂﻃﻄﻅﻆﻇﻈﻉﻊﻋﻌﻍﻎﻏﻐﻑﻒﻓﻔﻕﻖﻗﻘﻙﻚﻛﻜﻝﻞﻟﻠﻡﻢﻣﻤﻥﻦﻧﻨﻩﻪﻫﻬﻭﻮﻯﻰﻱﻲﻳﻴﻵﻶﻷﻸﻹﻺﻻﻼ'; |
||
8802 | $result = mb_substr($string, 24, 12); |
||
8803 | $expected = 'ﻉﻊﻋﻌﻍﻎﻏﻐﻑﻒﻓﻔ'; |
||
8804 | $this->assertEquals($expected, $result); |
||
8805 | |||
8806 | $string = 'abcdefghijklmnopqrstuvwxyz'; |
||
8807 | $result = mb_substr($string, 11, 2); |
||
8808 | $expected = 'lm'; |
||
8809 | $this->assertEquals($expected, $result); |
||
8810 | |||
8811 | $string = '。「」、・ヲァィゥェォャュョッーアイウエオカキク'; |
||
8812 | $result = mb_substr($string, 7, 11); |
||
8813 | $expected = 'ィゥェォャュョッーアイ'; |
||
8814 | $this->assertEquals($expected, $result); |
||
8815 | |||
8816 | $string = 'ケコサシスセソタチツテトナニヌネノハヒフヘホマミムメモヤユヨラリルレロワン゙'; |
||
8817 | $result = mb_substr($string, 13, 13); |
||
8818 | $expected = 'ニヌネノハヒフヘホマミムメ'; |
||
8819 | $this->assertEquals($expected, $result); |
||
8820 | |||
8821 | $string = 'Ĥēĺļŏ, Ŵőřļď!'; |
||
8822 | $result = mb_substr($string, 3, 4); |
||
8823 | $expected = 'ļŏ, '; |
||
8824 | $this->assertEquals($expected, $result); |
||
8825 | |||
8826 | $string = 'Hello, World!'; |
||
8827 | $result = mb_substr($string, 3, 4); |
||
8828 | $expected = 'lo, '; |
||
8829 | $this->assertEquals($expected, $result); |
||
8830 | |||
8831 | $string = 'čini'; |
||
8832 | $result = mb_substr($string, 3); |
||
8833 | $expected = 'i'; |
||
8834 | $this->assertEquals($expected, $result); |
||
8835 | |||
8836 | $string = 'moći'; |
||
8837 | $result = mb_substr($string, 1); |
||
8838 | $expected = 'oći'; |
||
8839 | $this->assertEquals($expected, $result); |
||
8840 | |||
8841 | $string = 'državni'; |
||
8842 | $result = mb_substr($string, 0, 2); |
||
8843 | $expected = 'dr'; |
||
8844 | $this->assertEquals($expected, $result); |
||
8845 | |||
8846 | $string = '把百度设为首页'; |
||
8847 | $result = mb_substr($string, 3, 3); |
||
8848 | $expected = '设为首'; |
||
8849 | $this->assertEquals($expected, $result); |
||
8850 | |||
8851 | $string = '一二三周永龍'; |
||
8852 | $result = mb_substr($string, 0, 1); |
||
8853 | $expected = '一'; |
||
8854 | $this->assertEquals($expected, $result); |
||
8855 | |||
8856 | $string = '一二三周永龍'; |
||
8857 | $result = mb_substr($string, 6); |
||
8858 | $expected = false; |
||
8859 | $this->assertEquals($expected, $result); |
||
8860 | |||
8861 | $string = '一二三周永龍'; |
||
8862 | $result = mb_substr($string, 0); |
||
8863 | $expected = '一二三周永龍'; |
||
8864 | $this->assertEquals($expected, $result); |
||
8865 | } |
||
8866 | |||
8867 | /**
|
||
8868 | * testMultibyteSubstr method
|
||
8869 | *
|
||
8870 | * @return void
|
||
8871 | */
|
||
8872 | public function testMultibyteSubstr() { |
||
8873 | $string = 'ABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789'; |
||
8874 | $result = Multibyte::substr($string, 4, 7); |
||
8875 | $expected = 'EFGHIJK'; |
||
8876 | $this->assertEquals($expected, $result); |
||
8877 | |||
8878 | $string = 'ÀÁÂÃÄÅÆÇÈÉÊËÌÍÎÏÐÑÒÓÔÕÖØÙÚÛÜÝÞ'; |
||
8879 | $result = Multibyte::substr($string, 4, 7); |
||
8880 | $expected = 'ÄÅÆÇÈÉÊ'; |
||
8881 | $this->assertEquals($expected, $result); |
||
8882 | |||
8883 | $string = 'ĀĂĄĆĈĊČĎĐĒĔĖĘĚĜĞĠĢĤĦĨĪĬĮIJĴĶĹĻĽĿŁŃŅŇŊŌŎŐŒŔŖŘŚŜŞŠŢŤŦŨŪŬŮŰŲŴŶŹŻŽ'; |
||
8884 | $result = Multibyte::substr($string, 4, 7); |
||
8885 | $expected = 'ĈĊČĎĐĒĔ'; |
||
8886 | $this->assertEquals($expected, $result); |
||
8887 | |||
8888 | $string = '!"#$%&\'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~'; |
||
8889 | $result = Multibyte::substr($string, 4, 7); |
||
8890 | $expected = '%&\'()*+'; |
||
8891 | $this->assertEquals($expected, $result); |
||
8892 | |||
8893 | $string = '¡¢£¤¥¦§¨©ª«¬®¯°±²³´µ¶·¸¹º»¼½¾¿ÀÁÂÃÄÅÆÇÈ'; |
||
8894 | $result = Multibyte::substr($string, 4); |
||
8895 | $expected = '¥¦§¨©ª«¬®¯°±²³´µ¶·¸¹º»¼½¾¿ÀÁÂÃÄÅÆÇÈ'; |
||
8896 | $this->assertEquals($expected, $result); |
||
8897 | |||
8898 | $string = 'ÉÊËÌÍÎÏÐÑÒÓÔÕÖ×ØÙÚÛÜÝÞßàáâãäåæçèéêëìíîïðñòóôõö÷øùúûüýþÿĀāĂ㥹ĆćĈĉĊċČčĎďĐđĒēĔĕĖėĘęĚěĜĝĞğĠġĢģĤĥĦħĨĩĪīĬ'; |
||
8899 | $result = Multibyte::substr($string, 4, 7); |
||
8900 | $expected = 'ÍÎÏÐÑÒÓ'; |
||
8901 | $this->assertEquals($expected, $result); |
||
8902 | |||
8903 | $string = 'ĭĮįİıIJijĴĵĶķĸĹĺĻļĽľĿŀŁłŃńŅņŇňʼnŊŋŌōŎŏŐőŒœŔŕŖŗŘřŚśŜŝŞşŠšŢţŤťŦŧŨũŪūŬŭŮůŰűŲųŴŵŶŷŸŹźŻżŽžſƀƁƂƃƄƅƆƇƈƉƊƋƌƍƎƏƐ'; |
||
8904 | $result = Multibyte::substr($string, 4, 7); |
||
8905 | $expected = 'ıIJijĴĵĶķ'; |
||
8906 | $this->assertEquals($expected, $result); |
||
8907 | |||
8908 | $string = 'ƑƒƓƔƕƖƗƘƙƚƛƜƝƞƟƠơƢƣƤƥƦƧƨƩƪƫƬƭƮƯưƱƲƳƴƵƶƷƸƹƺƻƼƽƾƿǀǁǂǃDŽDždžLJLjljNJNjnjǍǎǏǐǑǒǓǔǕǖǗǘǙǚǛǜǝǞǟǠǡǢǣǤǥǦǧǨǩǪǫǬǭǮǯǰDZDzdzǴ'; |
||
8909 | $result = Multibyte::substr($string, 25); |
||
8910 | $expected = 'ƪƫƬƭƮƯưƱƲƳƴƵƶƷƸƹƺƻƼƽƾƿǀǁǂǃDŽDždžLJLjljNJNjnjǍǎǏǐǑǒǓǔǕǖǗǘǙǚǛǜǝǞǟǠǡǢǣǤǥǦǧǨǩǪǫǬǭǮǯǰDZDzdzǴ'; |
||
8911 | $this->assertEquals($expected, $result); |
||
8912 | |||
8913 | $string = 'əɚɛɜɝɞɟɠɡɢɣɤɥɦɧɨɩɪɫɬɭɮɯɰɱɲɳɴɵɶɷɸɹɺɻɼɽɾɿʀʁʂʃʄʅʆʇʈʉʊʋʌʍʎʏʐʑʒʓʔʕʖʗʘʙʚʛʜʝʞʟʠʡʢʣʤʥʦʧʨʩʪʫʬʭʮʯʰʱʲʳʴʵʶʷʸʹʺʻʼ'; |
||
8914 | $result = Multibyte::substr($string, 3); |
||
8915 | $expected = 'ɜɝɞɟɠɡɢɣɤɥɦɧɨɩɪɫɬɭɮɯɰɱɲɳɴɵɶɷɸɹɺɻɼɽɾɿʀʁʂʃʄʅʆʇʈʉʊʋʌʍʎʏʐʑʒʓʔʕʖʗʘʙʚʛʜʝʞʟʠʡʢʣʤʥʦʧʨʩʪʫʬʭʮʯʰʱʲʳʴʵʶʷʸʹʺʻʼ'; |
||
8916 | $this->assertEquals($expected, $result); |
||
8917 | |||
8918 | $string = 'ЀЁЂЃЄЅІЇЈЉЊЋЌЍЎЏАБВГДЕЖЗИЙКЛ'; |
||
8919 | $result = Multibyte::substr($string, 3); |
||
8920 | $expected = 'ЃЄЅІЇЈЉЊЋЌЍЎЏАБВГДЕЖЗИЙКЛ'; |
||
8921 | $this->assertEquals($expected, $result); |
||
8922 | |||
8923 | $string = 'МНОПРСТУФХЦЧШЩЪЫЬЭЮЯабвгдежзийклмнопрстуфхцчшщъыь'; |
||
8924 | $result = Multibyte::substr($string, 3, 16); |
||
8925 | $expected = 'ПРСТУФХЦЧШЩЪЫЬЭЮ'; |
||
8926 | $this->assertEquals($expected, $result); |
||
8927 | |||
8928 | $string = 'فقكلمنهوىيًٌٍَُ'; |
||
8929 | $result = Multibyte::substr($string, 3, 6); |
||
8930 | $expected = 'لمنهوى'; |
||
8931 | $this->assertEquals($expected, $result); |
||
8932 | |||
8933 | $string = '✰✱✲✳✴✵✶✷✸✹✺✻✼✽✾✿❀❁❂❃❄❅❆❇❈❉❊❋❌❍❎❏❐❑❒❓❔❕❖❗❘❙❚❛❜❝❞'; |
||
8934 | $result = Multibyte::substr($string, 6, 14); |
||
8935 | $expected = '✶✷✸✹✺✻✼✽✾✿❀❁❂❃'; |
||
8936 | $this->assertEquals($expected, $result); |
||
8937 | |||
8938 | $string = '⺀⺁⺂⺃⺄⺅⺆⺇⺈⺉⺊⺋⺌⺍⺎⺏⺐⺑⺒⺓⺔⺕⺖⺗⺘⺙⺛⺜⺝⺞⺟⺠⺡⺢⺣⺤⺥⺦⺧⺨⺩⺪⺫⺬⺭⺮⺯⺰⺱⺲⺳⺴⺵⺶⺷⺸⺹⺺⺻⺼⺽⺾⺿⻀⻁⻂⻃⻄⻅⻆⻇⻈⻉⻊⻋⻌⻍⻎⻏⻐⻑⻒⻓⻔⻕⻖⻗⻘⻙⻚⻛⻜⻝⻞⻟⻠'; |
||
8939 | $result = Multibyte::substr($string, 8, 13); |
||
8940 | $expected = '⺈⺉⺊⺋⺌⺍⺎⺏⺐⺑⺒⺓⺔'; |
||
8941 | $this->assertEquals($expected, $result); |
||
8942 | |||
8943 | $string = '⽅⽆⽇⽈⽉⽊⽋⽌⽍⽎⽏⽐⽑⽒⽓⽔⽕⽖⽗⽘⽙⽚⽛⽜⽝⽞⽟⽠⽡⽢⽣⽤⽥⽦⽧⽨⽩⽪⽫⽬⽭⽮⽯⽰⽱⽲⽳⽴⽵⽶⽷⽸⽹⽺⽻⽼⽽⽾⽿'; |
||
8944 | $result = Multibyte::substr($string, 12, 24); |
||
8945 | $expected = '⽑⽒⽓⽔⽕⽖⽗⽘⽙⽚⽛⽜⽝⽞⽟⽠⽡⽢⽣⽤⽥⽦⽧⽨'; |
||
8946 | $this->assertEquals($expected, $result); |
||
8947 | |||
8948 | $string = '눡눢눣눤눥눦눧눨눩눪눫눬눭눮눯눰눱눲눳눴눵눶눷눸눹눺눻눼눽눾눿뉀뉁뉂뉃뉄뉅뉆뉇뉈뉉뉊뉋뉌뉍뉎뉏뉐뉑뉒뉓뉔뉕뉖뉗뉘뉙뉚뉛뉜뉝뉞뉟뉠뉡뉢뉣뉤뉥뉦뉧뉨뉩뉪뉫뉬뉭뉮뉯뉰뉱뉲뉳뉴뉵뉶뉷뉸뉹뉺뉻뉼뉽뉾뉿늀늁늂늃늄'; |
||
8949 | $result = Multibyte::substr($string, 12, 24); |
||
8950 | $expected = '눭눮눯눰눱눲눳눴눵눶눷눸눹눺눻눼눽눾눿뉀뉁뉂뉃뉄'; |
||
8951 | $this->assertEquals($expected, $result); |
||
8952 | |||
8953 | $string = 'ﹰﹱﹲﹳﹴﹶﹷﹸﹹﹺﹻﹼﹽﹾﹿﺀﺁﺂﺃﺄﺅﺆﺇﺈﺉﺊﺋﺌﺍﺎﺏﺐﺑﺒﺓﺔﺕﺖﺗﺘﺙﺚﺛﺜﺝﺞﺟﺠﺡﺢﺣﺤﺥﺦﺧﺨﺩﺪﺫﺬﺭﺮﺯﺰ'; |
||
8954 | $result = Multibyte::substr($string, 12); |
||
8955 | $expected = 'ﹼﹽﹾﹿﺀﺁﺂﺃﺄﺅﺆﺇﺈﺉﺊﺋﺌﺍﺎﺏﺐﺑﺒﺓﺔﺕﺖﺗﺘﺙﺚﺛﺜﺝﺞﺟﺠﺡﺢﺣﺤﺥﺦﺧﺨﺩﺪﺫﺬﺭﺮﺯﺰ'; |
||
8956 | $this->assertEquals($expected, $result); |
||
8957 | |||
8958 | $string = 'ﺱﺲﺳﺴﺵﺶﺷﺸﺹﺺﺻﺼﺽﺾﺿﻀﻁﻂﻃﻄﻅﻆﻇﻈﻉﻊﻋﻌﻍﻎﻏﻐﻑﻒﻓﻔﻕﻖﻗﻘﻙﻚﻛﻜﻝﻞﻟﻠﻡﻢﻣﻤﻥﻦﻧﻨﻩﻪﻫﻬﻭﻮﻯﻰﻱﻲﻳﻴﻵﻶﻷﻸﻹﻺﻻﻼ'; |
||
8959 | $result = Multibyte::substr($string, 24, 12); |
||
8960 | $expected = 'ﻉﻊﻋﻌﻍﻎﻏﻐﻑﻒﻓﻔ'; |
||
8961 | $this->assertEquals($expected, $result); |
||
8962 | |||
8963 | $string = 'abcdefghijklmnopqrstuvwxyz'; |
||
8964 | $result = Multibyte::substr($string, 11, 2); |
||
8965 | $expected = 'lm'; |
||
8966 | $this->assertEquals($expected, $result); |
||
8967 | |||
8968 | $string = '。「」、・ヲァィゥェォャュョッーアイウエオカキク'; |
||
8969 | $result = Multibyte::substr($string, 7, 11); |
||
8970 | $expected = 'ィゥェォャュョッーアイ'; |
||
8971 | $this->assertEquals($expected, $result); |
||
8972 | |||
8973 | $string = 'ケコサシスセソタチツテトナニヌネノハヒフヘホマミムメモヤユヨラリルレロワン゙'; |
||
8974 | $result = Multibyte::substr($string, 13, 13); |
||
8975 | $expected = 'ニヌネノハヒフヘホマミムメ'; |
||
8976 | $this->assertEquals($expected, $result); |
||
8977 | |||
8978 | $string = 'Ĥēĺļŏ, Ŵőřļď!'; |
||
8979 | $result = Multibyte::substr($string, 3, 4); |
||
8980 | $expected = 'ļŏ, '; |
||
8981 | $this->assertEquals($expected, $result); |
||
8982 | |||
8983 | $string = 'Hello, World!'; |
||
8984 | $result = Multibyte::substr($string, 3, 4); |
||
8985 | $expected = 'lo, '; |
||
8986 | $this->assertEquals($expected, $result); |
||
8987 | |||
8988 | $string = 'čini'; |
||
8989 | $result = Multibyte::substr($string, 3); |
||
8990 | $expected = 'i'; |
||
8991 | $this->assertEquals($expected, $result); |
||
8992 | |||
8993 | $string = 'moći'; |
||
8994 | $result = Multibyte::substr($string, 1); |
||
8995 | $expected = 'oći'; |
||
8996 | $this->assertEquals($expected, $result); |
||
8997 | |||
8998 | $string = 'državni'; |
||
8999 | $result = Multibyte::substr($string, 0, 2); |
||
9000 | $expected = 'dr'; |
||
9001 | $this->assertEquals($expected, $result); |
||
9002 | |||
9003 | $string = '把百度设为首页'; |
||
9004 | $result = Multibyte::substr($string, 3, 3); |
||
9005 | $expected = '设为首'; |
||
9006 | $this->assertEquals($expected, $result); |
||
9007 | |||
9008 | $string = '一二三周永龍'; |
||
9009 | $result = Multibyte::substr($string, 0, 1); |
||
9010 | $expected = '一'; |
||
9011 | $this->assertEquals($expected, $result); |
||
9012 | |||
9013 | $string = '一二三周永龍'; |
||
9014 | $result = Multibyte::substr($string, 6); |
||
9015 | $expected = false; |
||
9016 | $this->assertEquals($expected, $result); |
||
9017 | |||
9018 | $string = '一二三周永龍'; |
||
9019 | $result = Multibyte::substr($string, 0); |
||
9020 | $expected = '一二三周永龍'; |
||
9021 | $this->assertEquals($expected, $result); |
||
9022 | } |
||
9023 | |||
9024 | /**
|
||
9025 | * testMultibyteSubstr method
|
||
9026 | *
|
||
9027 | * @return void
|
||
9028 | */
|
||
9029 | public function testMultibyteMimeEncode() { |
||
9030 | $string = 'ABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789'; |
||
9031 | $result = Multibyte::mimeEncode($string); |
||
9032 | $this->assertEquals($string, $result); |
||
9033 | |||
9034 | $string = 'ÀÁÂÃÄÅÆÇÈÉÊËÌÍÎÏÐÑÒÓÔÕÖØÙÚÛÜÝÞ'; |
||
9035 | $result = Multibyte::mimeEncode($string); |
||
9036 | $expected = '=?UTF-8?B?w4DDgcOCw4PDhMOFw4bDh8OIw4nDisOLw4zDjcOOw4/DkMORw5LDk8OUw5U=?=' . "\r\n" . |
||
9037 | ' =?UTF-8?B?w5bDmMOZw5rDm8Ocw53Dng==?=';
|
||
9038 | $this->assertEquals($expected, $result); |
||
9039 | $result = Multibyte::mimeEncode($string, null, "\n"); |
||
9040 | $expected = '=?UTF-8?B?w4DDgcOCw4PDhMOFw4bDh8OIw4nDisOLw4zDjcOOw4/DkMORw5LDk8OUw5U=?=' . "\n" . |
||
9041 | ' =?UTF-8?B?w5bDmMOZw5rDm8Ocw53Dng==?=';
|
||
9042 | $this->assertEquals($expected, $result); |
||
9043 | |||
9044 | $string = 'ĀĂĄĆĈĊČĎĐĒĔĖĘĚĜĞĠĢĤĦĨĪĬĮIJĴĶĹĻĽĿŁŃŅŇŊŌŎŐŒŔŖŘŚŜŞŠŢŤŦŨŪŬŮŰŲŴŶŹŻŽ'; |
||
9045 | $result = Multibyte::mimeEncode($string); |
||
9046 | $expected = '=?UTF-8?B?xIDEgsSExIbEiMSKxIzEjsSQxJLElMSWxJjEmsScxJ7EoMSixKTEpsSoxKo=?=' . "\r\n" . |
||
9047 | ' =?UTF-8?B?xKzErsSyxLTEtsS5xLvEvcS/xYHFg8WFxYfFisWMxY7FkMWSxZTFlsWYxZo=?=' . "\r\n" . |
||
9048 | ' =?UTF-8?B?xZzFnsWgxaLFpMWmxajFqsWsxa7FsMWyxbTFtsW5xbvFvQ==?=';
|
||
9049 | $this->assertEquals($expected, $result); |
||
9050 | |||
9051 | $string = '!"#$%&\'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~'; |
||
9052 | $result = Multibyte::mimeEncode($string); |
||
9053 | $expected = '=?UTF-8?B?ISIjJCUmJygpKissLS4vMDEyMzQ1Njc4OTo7PD0+P0BBQkNERUZHSElKS0xN?=' . "\r\n" . |
||
9054 | ' =?UTF-8?B?Tk9QUVJTVFVWV1hZWltcXV5fYGFiY2RlZmdoaWprbG1ub3BxcnN0dXZ3eHl6?=' . "\r\n" . |
||
9055 | ' =?UTF-8?B?e3x9fg==?=';
|
||
9056 | $this->assertEquals($expected, $result); |
||
9057 | |||
9058 | $string = '¡¢£¤¥¦§¨©ª«¬®¯°±²³´µ¶·¸¹º»¼½¾¿ÀÁÂÃÄÅÆÇÈ'; |
||
9059 | $result = Multibyte::mimeEncode($string); |
||
9060 | $expected = '=?UTF-8?B?wqHCosKjwqTCpcKmwqfCqMKpwqrCq8Kswq3CrsKvwrDCscKywrPCtMK1wrY=?=' . "\r\n" . |
||
9061 | ' =?UTF-8?B?wrfCuMK5wrrCu8K8wr3CvsK/w4DDgcOCw4PDhMOFw4bDh8OI?=';
|
||
9062 | $this->assertEquals($expected, $result); |
||
9063 | |||
9064 | $string = 'ÉÊËÌÍÎÏÐÑÒÓÔÕÖ×ØÙÚÛÜÝÞßàáâãäåæçèéêëìíîïðñòóôõö÷øùúûüýþÿĀāĂ㥹ĆćĈĉĊċČčĎďĐđĒēĔĕĖėĘęĚěĜĝĞğĠġĢģĤĥĦħĨĩĪīĬ'; |
||
9065 | $result = Multibyte::mimeEncode($string); |
||
9066 | $expected = '=?UTF-8?B?w4nDisOLw4zDjcOOw4/DkMORw5LDk8OUw5XDlsOXw5jDmcOaw5vDnMOdw54=?=' . "\r\n" . |
||
9067 | ' =?UTF-8?B?w5/DoMOhw6LDo8Okw6XDpsOnw6jDqcOqw6vDrMOtw67Dr8Oww7HDssOzw7Q=?=' . "\r\n" . |
||
9068 | ' =?UTF-8?B?w7XDtsO3w7jDucO6w7vDvMO9w77Dv8SAxIHEgsSDxITEhcSGxIfEiMSJxIo=?=' . "\r\n" . |
||
9069 | ' =?UTF-8?B?xIvEjMSNxI7Ej8SQxJHEksSTxJTElcSWxJfEmMSZxJrEm8ScxJ3EnsSfxKA=?=' . "\r\n" . |
||
9070 | ' =?UTF-8?B?xKHEosSjxKTEpcSmxKfEqMSpxKrEq8Ss?=';
|
||
9071 | $this->assertEquals($expected, $result); |
||
9072 | |||
9073 | $string = 'ĭĮįİıIJijĴĵĶķĸĹĺĻļĽľĿŀŁłŃńŅņŇňʼnŊŋŌōŎŏŐőŒœŔŕŖŗŘřŚśŜŝŞşŠšŢţŤťŦŧŨũŪūŬŭŮůŰűŲųŴŵŶŷŸŹźŻżŽžſƀƁƂƃƄƅƆƇƈƉƊƋƌƍƎƏƐ'; |
||
9074 | $result = Multibyte::mimeEncode($string); |
||
9075 | $expected = '=?UTF-8?B?xK3ErsSvxLDEscSyxLPEtMS1xLbEt8S4xLnEusS7xLzEvcS+xL/FgMWBxYI=?=' . "\r\n" . |
||
9076 | ' =?UTF-8?B?xYPFhMWFxYbFh8WIxYnFisWLxYzFjcWOxY/FkMWRxZLFk8WUxZXFlsWXxZg=?=' . "\r\n" . |
||
9077 | ' =?UTF-8?B?xZnFmsWbxZzFncWexZ/FoMWhxaLFo8WkxaXFpsWnxajFqcWqxavFrMWtxa4=?=' . "\r\n" . |
||
9078 | ' =?UTF-8?B?xa/FsMWxxbLFs8W0xbXFtsW3xbjFucW6xbvFvMW9xb7Fv8aAxoHGgsaDxoQ=?=' . "\r\n" . |
||
9079 | ' =?UTF-8?B?xoXGhsaHxojGicaKxovGjMaNxo7Gj8aQ?=';
|
||
9080 | $this->assertEquals($expected, $result); |
||
9081 | |||
9082 | $string = 'ƑƒƓƔƕƖƗƘƙƚƛƜƝƞƟƠơƢƣƤƥƦƧƨƩƪƫƬƭƮƯưƱƲƳƴƵƶƷƸƹƺƻƼƽƾƿǀǁǂǃDŽDždžLJLjljNJNjnjǍǎǏǐǑǒǓǔǕǖǗǘǙǚǛǜǝǞǟǠǡǢǣǤǥǦǧǨǩǪǫǬǭǮǯǰDZDzdzǴ'; |
||
9083 | $result = Multibyte::mimeEncode($string); |
||
9084 | $expected = '=?UTF-8?B?xpHGksaTxpTGlcaWxpfGmMaZxprGm8acxp3GnsafxqDGocaixqPGpMalxqY=?=' . "\r\n" . |
||
9085 | ' =?UTF-8?B?xqfGqMapxqrGq8asxq3GrsavxrDGscayxrPGtMa1xrbGt8a4xrnGusa7xrw=?=' . "\r\n" . |
||
9086 | ' =?UTF-8?B?xr3Gvsa/x4DHgceCx4PHhMeFx4bHh8eIx4nHiseLx4zHjceOx4/HkMeRx5I=?=' . "\r\n" . |
||
9087 | ' =?UTF-8?B?x5PHlMeVx5bHl8eYx5nHmsebx5zHnceex5/HoMehx6LHo8ekx6XHpsenx6g=?=' . "\r\n" . |
||
9088 | ' =?UTF-8?B?x6nHqserx6zHrceux6/HsMexx7LHs8e0?=';
|
||
9089 | $this->assertEquals($expected, $result); |
||
9090 | |||
9091 | $string = 'əɚɛɜɝɞɟɠɡɢɣɤɥɦɧɨɩɪɫɬɭɮɯɰɱɲɳɴɵɶɷɸɹɺɻɼɽɾɿʀʁʂʃʄʅʆʇʈʉʊʋʌʍʎʏʐʑʒʓʔʕʖʗʘʙʚʛʜʝʞʟʠʡʢʣʤʥʦʧʨʩʪʫʬʭʮʯʰʱʲʳʴʵʶʷʸʹʺʻʼ'; |
||
9092 | $result = Multibyte::mimeEncode($string); |
||
9093 | $expected = '=?UTF-8?B?yZnJmsmbyZzJncmeyZ/JoMmhyaLJo8mkyaXJpsmnyajJqcmqyavJrMmtya4=?=' . "\r\n" . |
||
9094 | ' =?UTF-8?B?ya/JsMmxybLJs8m0ybXJtsm3ybjJucm6ybvJvMm9yb7Jv8qAyoHKgsqDyoQ=?=' . "\r\n" . |
||
9095 | ' =?UTF-8?B?yoXKhsqHyojKicqKyovKjMqNyo7Kj8qQypHKksqTypTKlcqWypfKmMqZypo=?=' . "\r\n" . |
||
9096 | ' =?UTF-8?B?ypvKnMqdyp7Kn8qgyqHKosqjyqTKpcqmyqfKqMqpyqrKq8qsyq3KrsqvyrA=?=' . "\r\n" . |
||
9097 | ' =?UTF-8?B?yrHKssqzyrTKtcq2yrfKuMq5yrrKu8q8?=';
|
||
9098 | $this->assertEquals($expected, $result); |
||
9099 | |||
9100 | $string = 'ЀЁЂЃЄЅІЇЈЉЊЋЌЍЎЏАБВГДЕЖЗИЙКЛ'; |
||
9101 | $result = Multibyte::mimeEncode($string); |
||
9102 | $expected = '=?UTF-8?B?0IDQgdCC0IPQhNCF0IbQh9CI0InQitCL0IzQjdCO0I/QkNCR0JLQk9CU0JU=?=' . "\r\n" . |
||
9103 | ' =?UTF-8?B?0JbQl9CY0JnQmtCb?=';
|
||
9104 | $this->assertEquals($expected, $result); |
||
9105 | |||
9106 | $string = 'МНОПРСТУФХЦЧШЩЪЫЬЭЮЯабвгдежзийклмнопрстуфхцчшщъыь'; |
||
9107 | $result = Multibyte::mimeEncode($string); |
||
9108 | $expected = '=?UTF-8?B?0JzQndCe0J/QoNCh0KLQo9Ck0KXQptCn0KjQqdCq0KvQrNCt0K7Qr9Cw0LE=?=' . "\r\n" . |
||
9109 | ' =?UTF-8?B?0LLQs9C00LXQttC30LjQudC60LvQvNC90L7Qv9GA0YHRgtGD0YTRhdGG0Yc=?=' . "\r\n" . |
||
9110 | ' =?UTF-8?B?0YjRidGK0YvRjA==?=';
|
||
9111 | $this->assertEquals($expected, $result); |
||
9112 | |||
9113 | $string = 'فقكلمنهوىيًٌٍَُ'; |
||
9114 | $result = Multibyte::mimeEncode($string); |
||
9115 | $expected = '=?UTF-8?B?2YHZgtmD2YTZhdmG2YfZiNmJ2YrZi9mM2Y3ZjtmP?='; |
||
9116 | $this->assertEquals($expected, $result); |
||
9117 | |||
9118 | $string = '✰✱✲✳✴✵✶✷✸✹✺✻✼✽✾✿❀❁❂❃❄❅❆❇❈❉❊❋❌❍❎❏❐❑❒❓❔❕❖❗❘❙❚❛❜❝❞'; |
||
9119 | $result = Multibyte::mimeEncode($string); |
||
9120 | $expected = '=?UTF-8?B?4pyw4pyx4pyy4pyz4py04py14py24py34py44py54py64py74py84py94py+?=' . "\r\n" . |
||
9121 | ' =?UTF-8?B?4py/4p2A4p2B4p2C4p2D4p2E4p2F4p2G4p2H4p2I4p2J4p2K4p2L4p2M4p2N?=' . "\r\n" . |
||
9122 | ' =?UTF-8?B?4p2O4p2P4p2Q4p2R4p2S4p2T4p2U4p2V4p2W4p2X4p2Y4p2Z4p2a4p2b4p2c?=' . "\r\n" . |
||
9123 | ' =?UTF-8?B?4p2d4p2e?=';
|
||
9124 | $this->assertEquals($expected, $result); |
||
9125 | |||
9126 | $string = '⺀⺁⺂⺃⺄⺅⺆⺇⺈⺉⺊⺋⺌⺍⺎⺏⺐⺑⺒⺓⺔⺕⺖⺗⺘⺙⺛⺜⺝⺞⺟⺠⺡⺢⺣⺤⺥⺦⺧⺨⺩⺪⺫⺬⺭⺮⺯⺰⺱⺲⺳⺴⺵⺶⺷⺸⺹⺺⺻⺼⺽⺾⺿⻀⻁⻂⻃⻄⻅⻆⻇⻈⻉⻊⻋⻌⻍⻎⻏⻐⻑⻒⻓⻔⻕⻖⻗⻘⻙⻚⻛⻜⻝⻞⻟⻠'; |
||
9127 | $result = Multibyte::mimeEncode($string); |
||
9128 | $expected = '=?UTF-8?B?4rqA4rqB4rqC4rqD4rqE4rqF4rqG4rqH4rqI4rqJ4rqK4rqL4rqM4rqN4rqO?=' . "\r\n" . |
||
9129 | ' =?UTF-8?B?4rqP4rqQ4rqR4rqS4rqT4rqU4rqV4rqW4rqX4rqY4rqZ4rqb4rqc4rqd4rqe?=' . "\r\n" . |
||
9130 | ' =?UTF-8?B?4rqf4rqg4rqh4rqi4rqj4rqk4rql4rqm4rqn4rqo4rqp4rqq4rqr4rqs4rqt?=' . "\r\n" . |
||
9131 | ' =?UTF-8?B?4rqu4rqv4rqw4rqx4rqy4rqz4rq04rq14rq24rq34rq44rq54rq64rq74rq8?=' . "\r\n" . |
||
9132 | ' =?UTF-8?B?4rq94rq+4rq/4ruA4ruB4ruC4ruD4ruE4ruF4ruG4ruH4ruI4ruJ4ruK4ruL?=' . "\r\n" . |
||
9133 | ' =?UTF-8?B?4ruM4ruN4ruO4ruP4ruQ4ruR4ruS4ruT4ruU4ruV4ruW4ruX4ruY4ruZ4rua?=' . "\r\n" . |
||
9134 | ' =?UTF-8?B?4rub4ruc4rud4rue4ruf4rug?=';
|
||
9135 | $this->assertEquals($expected, $result); |
||
9136 | |||
9137 | $string = '⽅⽆⽇⽈⽉⽊⽋⽌⽍⽎⽏⽐⽑⽒⽓⽔⽕⽖⽗⽘⽙⽚⽛⽜⽝⽞⽟⽠⽡⽢⽣⽤⽥⽦⽧⽨⽩⽪⽫⽬⽭⽮⽯⽰⽱⽲⽳⽴⽵⽶⽷⽸⽹⽺⽻⽼⽽⽾⽿'; |
||
9138 | $result = Multibyte::mimeEncode($string); |
||
9139 | $expected = '=?UTF-8?B?4r2F4r2G4r2H4r2I4r2J4r2K4r2L4r2M4r2N4r2O4r2P4r2Q4r2R4r2S4r2T?=' . "\r\n" . |
||
9140 | ' =?UTF-8?B?4r2U4r2V4r2W4r2X4r2Y4r2Z4r2a4r2b4r2c4r2d4r2e4r2f4r2g4r2h4r2i?=' . "\r\n" . |
||
9141 | ' =?UTF-8?B?4r2j4r2k4r2l4r2m4r2n4r2o4r2p4r2q4r2r4r2s4r2t4r2u4r2v4r2w4r2x?=' . "\r\n" . |
||
9142 | ' =?UTF-8?B?4r2y4r2z4r204r214r224r234r244r254r264r274r284r294r2+4r2/?=';
|
||
9143 | $this->assertEquals($expected, $result); |
||
9144 | |||
9145 | $string = '눡눢눣눤눥눦눧눨눩눪눫눬눭눮눯눰눱눲눳눴눵눶눷눸눹눺눻눼눽눾눿뉀뉁뉂뉃뉄뉅뉆뉇뉈뉉뉊뉋뉌뉍뉎뉏뉐뉑뉒뉓뉔뉕뉖뉗뉘뉙뉚뉛뉜뉝뉞뉟뉠뉡뉢뉣뉤뉥뉦뉧뉨뉩뉪뉫뉬뉭뉮뉯뉰뉱뉲뉳뉴뉵뉶뉷뉸뉹뉺뉻뉼뉽뉾뉿늀늁늂늃늄'; |
||
9146 | $result = Multibyte::mimeEncode($string); |
||
9147 | $expected = '=?UTF-8?B?64ih64ii64ij64ik64il64im64in64io64ip64iq64ir64is64it64iu64iv?=' . "\r\n" . |
||
9148 | ' =?UTF-8?B?64iw64ix64iy64iz64i064i164i264i364i464i564i664i764i864i964i+?=' . "\r\n" . |
||
9149 | ' =?UTF-8?B?64i/64mA64mB64mC64mD64mE64mF64mG64mH64mI64mJ64mK64mL64mM64mN?=' . "\r\n" . |
||
9150 | ' =?UTF-8?B?64mO64mP64mQ64mR64mS64mT64mU64mV64mW64mX64mY64mZ64ma64mb64mc?=' . "\r\n" . |
||
9151 | ' =?UTF-8?B?64md64me64mf64mg64mh64mi64mj64mk64ml64mm64mn64mo64mp64mq64mr?=' . "\r\n" . |
||
9152 | ' =?UTF-8?B?64ms64mt64mu64mv64mw64mx64my64mz64m064m164m264m364m464m564m6?=' . "\r\n" . |
||
9153 | ' =?UTF-8?B?64m764m864m964m+64m/64qA64qB64qC64qD64qE?=';
|
||
9154 | $this->assertEquals($expected, $result); |
||
9155 | |||
9156 | $string = 'ﹰﹱﹲﹳﹴﹶﹷﹸﹹﹺﹻﹼﹽﹾﹿﺀﺁﺂﺃﺄﺅﺆﺇﺈﺉﺊﺋﺌﺍﺎﺏﺐﺑﺒﺓﺔﺕﺖﺗﺘﺙﺚﺛﺜﺝﺞﺟﺠﺡﺢﺣﺤﺥﺦﺧﺨﺩﺪﺫﺬﺭﺮﺯﺰ'; |
||
9157 | $result = Multibyte::mimeEncode($string); |
||
9158 | $expected = '=?UTF-8?B?77mw77mx77my77mz77m077m177m277m377m477m577m677m777m877m977m+?=' . "\r\n" . |
||
9159 | ' =?UTF-8?B?77m/77qA77qB77qC77qD77qE77qF77qG77qH77qI77qJ77qK77qL77qM77qN?=' . "\r\n" . |
||
9160 | ' =?UTF-8?B?77qO77qP77qQ77qR77qS77qT77qU77qV77qW77qX77qY77qZ77qa77qb77qc?=' . "\r\n" . |
||
9161 | ' =?UTF-8?B?77qd77qe77qf77qg77qh77qi77qj77qk77ql77qm77qn77qo77qp77qq77qr?=' . "\r\n" . |
||
9162 | ' =?UTF-8?B?77qs77qt77qu77qv77qw?=';
|
||
9163 | $this->assertEquals($expected, $result); |
||
9164 | |||
9165 | $string = 'ﺱﺲﺳﺴﺵﺶﺷﺸﺹﺺﺻﺼﺽﺾﺿﻀﻁﻂﻃﻄﻅﻆﻇﻈﻉﻊﻋﻌﻍﻎﻏﻐﻑﻒﻓﻔﻕﻖﻗﻘﻙﻚﻛﻜﻝﻞﻟﻠﻡﻢﻣﻤﻥﻦﻧﻨﻩﻪﻫﻬﻭﻮﻯﻰﻱﻲﻳﻴﻵﻶﻷﻸﻹﻺﻻﻼ'; |
||
9166 | $result = Multibyte::mimeEncode($string); |
||
9167 | $expected = '=?UTF-8?B?77qx77qy77qz77q077q177q277q377q477q577q677q777q877q977q+77q/?=' . "\r\n" . |
||
9168 | ' =?UTF-8?B?77uA77uB77uC77uD77uE77uF77uG77uH77uI77uJ77uK77uL77uM77uN77uO?=' . "\r\n" . |
||
9169 | ' =?UTF-8?B?77uP77uQ77uR77uS77uT77uU77uV77uW77uX77uY77uZ77ua77ub77uc77ud?=' . "\r\n" . |
||
9170 | ' =?UTF-8?B?77ue77uf77ug77uh77ui77uj77uk77ul77um77un77uo77up77uq77ur77us?=' . "\r\n" . |
||
9171 | ' =?UTF-8?B?77ut77uu77uv77uw77ux77uy77uz77u077u177u277u377u477u577u677u7?=' . "\r\n" . |
||
9172 | ' =?UTF-8?B?77u8?=';
|
||
9173 | $this->assertEquals($expected, $result); |
||
9174 | |||
9175 | $string = 'abcdefghijklmnopqrstuvwxyz'; |
||
9176 | $result = Multibyte::mimeEncode($string); |
||
9177 | $expected = '=?UTF-8?B?772B772C772D772E772F772G772H772I772J772K772L772M772N772O772P?=' . "\r\n" . |
||
9178 | ' =?UTF-8?B?772Q772R772S772T772U772V772W772X772Y772Z772a?=';
|
||
9179 | $this->assertEquals($expected, $result); |
||
9180 | |||
9181 | $string = '。「」、・ヲァィゥェォャュョッーアイウエオカキク'; |
||
9182 | $result = Multibyte::mimeEncode($string); |
||
9183 | $expected = '=?UTF-8?B?772h772i772j772k772l772m772n772o772p772q772r772s772t772u772v?=' . "\r\n" . |
||
9184 | ' =?UTF-8?B?772w772x772y772z77207721772277237724?=';
|
||
9185 | $this->assertEquals($expected, $result); |
||
9186 | |||
9187 | $string = 'ケコサシスセソタチツテトナニヌネノハヒフヘホマミムメモヤユヨラリルレロワン゙'; |
||
9188 | $result = Multibyte::mimeEncode($string); |
||
9189 | $expected = '=?UTF-8?B?77257726772777287729772+772/776A776B776C776D776E776F776G776H?=' . "\r\n" . |
||
9190 | ' =?UTF-8?B?776I776J776K776L776M776N776O776P776Q776R776S776T776U776V776W?=' . "\r\n" . |
||
9191 | ' =?UTF-8?B?776X776Y776Z776a776b776c776d776e?=';
|
||
9192 | $this->assertEquals($expected, $result); |
||
9193 | |||
9194 | $string = 'Ĥēĺļŏ, Ŵőřļď!'; |
||
9195 | $result = Multibyte::mimeEncode($string); |
||
9196 | $expected = '=?UTF-8?B?xKTEk8S6xLzFjywgxbTFkcWZxLzEjyE=?='; |
||
9197 | $this->assertEquals($expected, $result); |
||
9198 | |||
9199 | $string = 'Hello, World!'; |
||
9200 | $result = Multibyte::mimeEncode($string); |
||
9201 | $this->assertEquals($string, $result); |
||
9202 | |||
9203 | $string = 'čini'; |
||
9204 | $result = Multibyte::mimeEncode($string); |
||
9205 | $expected = '=?UTF-8?B?xI1pbmk=?='; |
||
9206 | $this->assertEquals($expected, $result); |
||
9207 | |||
9208 | $string = 'moći'; |
||
9209 | $result = Multibyte::mimeEncode($string); |
||
9210 | $expected = '=?UTF-8?B?bW/Eh2k=?='; |
||
9211 | $this->assertEquals($expected, $result); |
||
9212 | |||
9213 | $string = 'državni'; |
||
9214 | $result = Multibyte::mimeEncode($string); |
||
9215 | $expected = '=?UTF-8?B?ZHLFvmF2bmk=?='; |
||
9216 | $this->assertEquals($expected, $result); |
||
9217 | |||
9218 | $string = '把百度设为首页'; |
||
9219 | $result = Multibyte::mimeEncode($string); |
||
9220 | $expected = '=?UTF-8?B?5oqK55m+5bqm6K6+5Li66aaW6aG1?='; |
||
9221 | $this->assertEquals($expected, $result); |
||
9222 | |||
9223 | $string = '一二三周永龍'; |
||
9224 | $result = Multibyte::mimeEncode($string); |
||
9225 | $expected = '=?UTF-8?B?5LiA5LqM5LiJ5ZGo5rC46b6N?='; |
||
9226 | $this->assertEquals($expected, $result); |
||
9227 | } |
||
9228 | } |