Lines Matching refs:n
18 echo "String len: $slen\n";
21 mb_internal_encoding('UTF-8') or print("mb_internal_encoding() failed\n");
23 echo "== POSITIVE OFFSET ==\n";
25 print mb_strpos($euc_jp, '���ܸ�', 0, 'EUC-JP') . "\n";
26 print mb_strpos($euc_jp, '0', 0, 'EUC-JP') . "\n";
27 print mb_strpos($euc_jp, 3, 0, 'EUC-JP') . "\n";
28 print mb_strpos($euc_jp, 0, 0, 'EUC-JP') . "\n";
29 print mb_strpos($euc_jp, '���ܸ�', 15, 'EUC-JP') . "\n";
30 print mb_strpos($euc_jp, '0', 15, 'EUC-JP') . "\n";
31 print mb_strpos($euc_jp, 3, 15, 'EUC-JP') . "\n";
32 print mb_strpos($euc_jp, 0, 15, 'EUC-JP') . "\n";
36 echo "== NEGATIVE OFFSET ==\n";
38 print mb_strpos($euc_jp, '���ܸ�', -15, 'EUC-JP') . "\n";
39 print mb_strpos($euc_jp, '0', -15, 'EUC-JP') . "\n";
40 print mb_strpos($euc_jp, 3, -15, 'EUC-JP') . "\n";
41 print mb_strpos($euc_jp, 0, -15, 'EUC-JP') . "\n";
42 print mb_strpos($euc_jp, 0, -43, 'EUC-JP') . "\n";
46 print ("== INVALID OFFSET ==\n");
49 ($r === FALSE) ? print "OK_INVALID_OFFSET\n" : print "NG_INVALID_OFFSET\n";
51 ($r === FALSE) ? print "OK_INVALID_OFFSET\n" : print "NG_INVALID_OFFSET\n";
53 ($r === FALSE) ? print "OK_INVALID_OFFSET\n" : print "NG_INVALID_OFFSET\n";
55 ($r === FALSE) ? print "OK_INVALID_OFFSET\n" : print "NG_INVALID_OFFSET\n";
57 ($r === FALSE) ? print "OK_INVALID_OFFSET\n" : print "NG_INVALID_OFFSET\n";
59 ($r === FALSE) ? print "OK_INVALID_OFFSET\n" : print "NG_INVALID_OFFSET\n";
61 ($r === FALSE) ? print "OK_INVALID_OFFSET\n" : print "NG_INVALID_OFFSET\n";
63 ($r === FALSE) ? print "OK_INVALID_OFFSET\n" : print "NG_INVALID_OFFSET\n";
65 ($r === FALSE) ? print "OK_INVALID_OFFSET\n" : print "NG_INVALID_OFFSET\n";
67 ($r === FALSE) ? print "OK_INVALID_OFFSET\n" : print "NG_INVALID_OFFSET\n";
70 print ("== OUT OF RANGE ==\n");
73 ($r === FALSE) ? print "OK_OUT_RANGE\n" : print "NG_OUT_RANGE\n";
75 ($r === FALSE) ? print "OK_OUT_RANGE\n" : print "NG_OUT_RANGE\n";
77 ($r === FALSE) ? print "OK_OUT_RANGE\n" : print "NG_OUT_RANGE\n";
79 ($r === FALSE) ? print "OK_OUT_RANGE\n" : print "NG_OUT_RANGE\n";
81 ($r === FALSE) ? print "OK_OUT_RANGE\n" : print "NG_OUT_RANGE\n";
83 ($r === FALSE) ? print "OK_OUT_RANGE\n" : print "NG_OUT_RANGE\n";
85 ($r === FALSE) ? print "OK_OUT_RANGE\n" : print "NG_OUT_RANGE\n";
87 ($r === FALSE) ? print "OK_OUT_RANGE\n" : print "NG_OUT_RANGE\n";
91 echo "== NON-EXISTENT ==\n";
94 ($r === FALSE) ? print "OK_STR\n" : print "NG_STR\n";
95 $r = mb_strpos($euc_jp, "\n", 0, 'EUC-JP');
96 ($r === FALSE) ? print "OK_NEWLINE\n" : print "NG_NEWLINE\n";
100 echo "== NO ENCODING PARAMETER ==\n";
102 mb_internal_encoding('EUC-JP') or print("mb_internal_encoding() failed\n");
104 print mb_strpos($euc_jp, '���ܸ�', 0) . "\n";
105 print mb_strpos($euc_jp, '0', 0) . "\n";
106 print mb_strpos($euc_jp, 3, 0) . "\n";
107 print mb_strpos($euc_jp, 0, 0) . "\n";
110 ($r === FALSE) ? print "OK_STR\n" : print "NG_STR\n";
111 $r = mb_strpos($euc_jp, "\n", 0);
112 ($r === FALSE) ? print "OK_NEWLINE\n" : print "NG_NEWLINE\n";
115 echo "== NO OFFSET AND ENCODING PARAMETER ==\n";
117 mb_internal_encoding('EUC-JP') or print("mb_internal_encoding() failed\n");
119 print mb_strpos($euc_jp, '���ܸ�') . "\n";
120 print mb_strpos($euc_jp, '0') . "\n";
121 print mb_strpos($euc_jp, 3) . "\n";
122 print mb_strpos($euc_jp, 0) . "\n";
125 ($r === FALSE) ? print "OK_STR\n" : print "NG_STR\n";
126 $r = mb_strpos($euc_jp, "\n");
127 ($r === FALSE) ? print "OK_NEWLINE\n" : print "NG_NEWLINE\n";
131 echo "== INVALID PARAMETER TEST ==\n";
134 ($r === NULL) ? print("OK_NULL\n") : print("NG_NULL\n");
136 ($r === NULL) ? print("OK_ARRAY\n") : print("NG_ARRAY\n");
138 ($r === NULL) ? print("OK_OBJECT\n") : print("NG_OBJECT\n");
140 ($r === NULL) ? print("OK_BAD_ENCODING\n") : print("NG_BAD_ENCODING\n");