Lines Matching refs:n
18 mb_internal_encoding('UTF-8') or print("mb_internal_encoding() failed\n");
20 echo "== POSITIVE OFFSET ==\n";
21 print mb_strpos($euc_jp, b'���ܸ�', 0, 'EUC-JP') . "\n";
22 print mb_strpos($euc_jp, b'0', 0, 'EUC-JP') . "\n";
23 print mb_strpos($euc_jp, 3, 0, 'EUC-JP') . "\n";
24 print mb_strpos($euc_jp, 0, 0, 'EUC-JP') . "\n";
25 print mb_strpos($euc_jp, b'���ܸ�', 15, 'EUC-JP') . "\n";
26 print mb_strpos($euc_jp, b'0', 15, 'EUC-JP') . "\n";
27 print mb_strpos($euc_jp, 3, 15, 'EUC-JP') . "\n";
28 print mb_strpos($euc_jp, 0, 15, 'EUC-JP') . "\n";
33 echo "== NEGATIVE OFFSET ==\n";
35 ($r === FALSE) ? print "OK_NEGATIVE_OFFSET\n" : print "NG_NEGATIVE_OFFSET\n";
37 ($r === FALSE) ? print "OK_NEGATIVE_OFFSET\n" : print "NG_NEGATIVE_OFFSET\n";
39 ($r === FALSE) ? print "OK_NEGATIVE_OFFSET\n" : print "NG_NEGATIVE_OFFSET\n";
41 ($r === FALSE) ? print "OK_NEGATIVE_OFFSET\n" : print "NG_NEGATIVE_OFFSET\n";
43 ($r === FALSE) ? print "OK_NEGATIVE_OFFSET\n" : print "NG_NEGATIVE_OFFSET\n";
45 ($r === FALSE) ? print "OK_NEGATIVE_OFFSET\n" : print "NG_NEGATIVE_OFFSET\n";
47 ($r === FALSE) ? print "OK_NEGATIVE_OFFSET\n" : print "NG_NEGATIVE_OFFSET\n";
49 ($r === FALSE) ? print "OK_NEGATIVE_OFFSET\n" : print "NG_NEGATIVE_OFFSET\n";
52 print ("== OUT OF RANGE ==\n");
54 ($r === FALSE) ? print "OK_OUT_RANGE\n" : print "NG_OUT_RANGE\n";
56 ($r === FALSE) ? print "OK_OUT_RANGE\n" : print "NG_OUT_RANGE\n";
58 ($r === FALSE) ? print "OK_OUT_RANGE\n" : print "NG_OUT_RANGE\n";
60 ($r === FALSE) ? print "OK_OUT_RANGE\n" : print "NG_OUT_RANGE\n";
62 // echo gettype($r). ' val '. $r ."\n";
66 echo "== NON-EXISTENT ==\n";
68 ($r === FALSE) ? print "OK_STR\n" : print "NG_STR\n";
69 $r = mb_strpos($euc_jp, b"\n", 0, 'EUC-JP');
70 ($r === FALSE) ? print "OK_NEWLINE\n" : print "NG_NEWLINE\n";
74 echo "== NO ENCODING PARAMETER ==\n";
75 mb_internal_encoding('EUC-JP') or print("mb_internal_encoding() failed\n");
77 print mb_strpos($euc_jp, b'���ܸ�', 0) . "\n";
78 print mb_strpos($euc_jp, b'0', 0) . "\n";
79 print mb_strpos($euc_jp, 3, 0) . "\n";
80 print mb_strpos($euc_jp, 0, 0) . "\n";
83 ($r === FALSE) ? print "OK_STR\n" : print "NG_STR\n";
84 $r = mb_strpos($euc_jp, b"\n", 0);
85 ($r === FALSE) ? print "OK_NEWLINE\n" : print "NG_NEWLINE\n";
88 echo "== NO OFFSET AND ENCODING PARAMETER ==\n";
89 mb_internal_encoding('EUC-JP') or print("mb_internal_encoding() failed\n");
91 print mb_strpos($euc_jp, b'���ܸ�') . "\n";
92 print mb_strpos($euc_jp, b'0') . "\n";
93 print mb_strpos($euc_jp, 3) . "\n";
94 print mb_strpos($euc_jp, 0) . "\n";
97 ($r === FALSE) ? print "OK_STR\n" : print "NG_STR\n";
98 $r = mb_strpos($euc_jp, b"\n");
99 ($r === FALSE) ? print "OK_NEWLINE\n" : print "NG_NEWLINE\n";
103 echo "== INVALID PARAMETER TEST ==\n";
106 ($r === FALSE) ? print("OK_NULL\n") : print("NG_NULL\n");
108 ($r === FALSE) ? print("OK_ARRAY\n") : print("NG_ARRAY\n");
110 ($r === FALSE) ? print("OK_OBJECT\n") : print("NG_OBJECT\n");
112 ($r === FALSE) ? print("OK_BAD_ENCODING\n") : print("NG_BAD_ENCODING\n");