Lines Matching refs:pos

159   PRInt32 pos=theDest.Find(pbuf);
160 NS_ASSERTION(pos==4,"Error: Find routine");
162 pos=theDest.Find(pbuf2,PR_FALSE,-1);
163 NS_ASSERTION(pos==0,"Error: Find routine");
165 pos=theDest.Find(pbuf2,PR_FALSE,pos+1);
166 NS_ASSERTION(pos==11,"Error: Find routine");
168 pos=theDest.FindChar('a');
169 NS_ASSERTION(pos==0,"Error: Find routine");
171 pos=theDest.FindChar('a',PR_FALSE,pos+1);
172 NS_ASSERTION(pos==11,"Error: Find routine");
174 pos=theDest.Find("efg");
175 NS_ASSERTION(pos==4,"Error: Find routine");
177 pos=theDest.Find("EFG",PR_TRUE);
178 NS_ASSERTION(pos==4,"Error: Find routine");
180 pos=theDest.FindChar('d');
181 NS_ASSERTION(pos==3,"Error: Find char routine");
183 pos=theDest.Find(s1);
184 NS_ASSERTION(pos==8,"Error: Find char routine");
186 pos=theDest.FindCharInSet("12k");
187 NS_ASSERTION(pos==10,"Error: Findcharinset routine");
189 pos=theDest.FindCharInSet(pbuf);
190 NS_ASSERTION(pos==4,"Error: Findcharinset routine");
192 pos=theDest.FindCharInSet(s1);
193 NS_ASSERTION(pos==8,"Error: Findcharinset routine");
195 pos=theDest.Find("efg",PR_FALSE,2);
196 NS_ASSERTION(pos==4,"Error: Find routine");
198 pos=theDest.RFindCharInSet("12k");
199 NS_ASSERTION(pos==10,"Error: RFindcharinset routine");
201 pos=theDest.RFindCharInSet("xyz");
202 NS_ASSERTION(pos==-1,"Error: RFindcharinset routine");
204 pos=theDest.RFindCharInSet(pbuf);
205 NS_ASSERTION(pos==6,"Error: RFindcharinset routine");
207 pos=theDest.RFindCharInSet(s1);
208 NS_ASSERTION(pos==10,"Error: RFindcharinset routine");
210 pos=theDest.RFind("efg");
211 NS_ASSERTION(pos==4,"Error: RFind routine");
213 pos=theDest.RFind("xxx");
214 NS_ASSERTION(pos==-1,"Error: RFind routine"); //this should fail
216 pos=theDest.RFind("");
217 NS_ASSERTION(pos==-1,"Error: RFind routine"); //this too should fail.
219 pos=theDest.RFindChar('a',PR_FALSE,4);
220 NS_ASSERTION(pos==-1,"Error: RFind routine");
227 PRInt32 pos=s1.FindChar('r'); //this will search from the beginning, and for the length of the string.
228 NS_ASSERTION(pos==9,"Error: FindChar() with offset and count");
230 pos=s1.FindChar('r',PR_FALSE,0,5); //this will search from the front using count. THIS WILL FAIL!
231 NS_ASSERTION(pos==-1,"Error: FindChar() with offset and count");
233 pos=s1.FindChar('r',PR_FALSE,0,10); //this will search from the front using count. THIS WILL SUCCEED!
234 NS_ASSERTION(pos==9,"Error: FindChar() with offset and count");
236 pos=s1.FindChar('i',PR_FALSE,5,5); //this will search from the middle using count. THIS WILL FAIL!
237 NS_ASSERTION(pos==-1,"Error: FindChar() with offset and count");
239 pos=s1.FindChar('i',PR_FALSE,5,10); //this will search from the middle using count. THIS WILL SUCCEED!
240 NS_ASSERTION(pos==13,"Error: FindChar() with offset and count");
242 pos=s1.FindChar('k',PR_FALSE,10,2); //this will search from near the end using count. THIS WILL FAIL!
243 NS_ASSERTION(pos==-1,"Error: FindChar() with offset and count");
245 pos=s1.FindChar('k',PR_FALSE,10,7); //this will search from near the end using count. THIS WILL SUCCEED!
246 NS_ASSERTION(pos==15,"Error: FindChar() with offset and count");
250 pos=s1.FindChar('k',PR_FALSE,100,2); //this will search from a bad offset. THIS WILL FAIL!
251 NS_ASSERTION(pos==-1,"Error: FindChar() with offset and count");
253 pos=s1.FindChar('k',PR_FALSE,10,0); //this will search for a bad count. THIS WILL FAIL!
254 NS_ASSERTION(pos==-1,"Error: FindChar() with offset and count");
256 pos=s1.FindChar('k',PR_FALSE,10,20); //this will search for a bad count. THIS WILL SUCCEED!
257 NS_ASSERTION(pos==15,"Error: FindChar() with offset and count");
259 pos=s1.FindChar('k',PR_FALSE,10,4); //this will search for a bad count. THIS WILL FAIL!
260 NS_ASSERTION(pos==-1,"Error: FindChar() with offset and count");
262 pos=10;
269 PRInt32 pos=s1.RFindChar('o'); //this will search from the end, and for the length of the string.
270 NS_ASSERTION(pos==4,"Error: RFindChar() with offset and count");
272 pos=s1.RFindChar('i'); //this will search from the end, and for the length of the string.
273 NS_ASSERTION(pos==13,"Error: RFindChar() with offset and count");
275 pos=s1.RFindChar(' ',PR_FALSE,-1,4); //this will search from the end, and for the length of the string.
276 NS_ASSERTION(pos==-1,"Error: RFindChar() with offset and count"); //THIS WILL FAIL
278 pos=s1.RFindChar(' ',PR_FALSE,12,1); //this will search from the middle, and for the length of 1.
279 NS_ASSERTION(pos==-1,"Error: RFindChar() with offset and count"); //THIS WILL FAIL
281 pos=s1.RFindChar(' ',PR_FALSE,12,2); //this will search from the middle, and for the length of 2.
282 NS_ASSERTION(pos==11,"Error: RFindChar() with offset and count"); //THIS WILL SUCCEED
284 pos=s1.RFindChar('o',PR_FALSE,-1,5); //this will search from the end using count. THIS WILL FAIL!
285 NS_ASSERTION(pos==-1,"Error: RFindChar() with offset and count");
287 pos=s1.RFindChar('o',PR_FALSE,-1,12); //this will search from the front using count. THIS WILL SUCCEED!
288 NS_ASSERTION(pos==4,"Error: RFindChar() with offset and count");
290 pos=s1.RFindChar('l',PR_FALSE,8,2); //this will search from the middle using count. THIS WILL FAIL!
291 NS_ASSERTION(pos==-1,"Error: RFindChar() with offset and count");
293 pos=s1.RFindChar('l',PR_FALSE,8,7); //this will search from the middle using count. THIS WILL SUCCEED!
294 NS_ASSERTION(pos==3,"Error: RFindChar() with offset and count");
298 pos=s1.RFindChar('h',PR_FALSE,3,2); //this will search from near the end using count. THIS WILL FAIL!
299 NS_ASSERTION(pos==-1,"Error: RFindChar() with offset and count");
301 pos=s1.RFindChar('h',PR_FALSE,3,7); //this will search from near the end using count. THIS WILL SUCCEED!
302 NS_ASSERTION(pos==0,"Error: RFindChar() with offset and count");
306 pos=s1.RFindChar('k',PR_FALSE,100,2); //this will search from a bad offset. THIS WILL FAIL!
307 NS_ASSERTION(pos==-1,"Error: RFindChar() with offset and count");
309 pos=s1.RFindChar('k',PR_FALSE,10,0); //this will search for a bad count. THIS WILL FAIL!
310 NS_ASSERTION(pos==-1,"Error: RFindChar() with offset and count");
312 pos=10;
319 PRInt32 pos= s1.Find("there",PR_FALSE,0,4); //first search from front using offset
320 NS_ASSERTION(pos==-1,"Error: Find() with offset and count"); //THIS WILL FAIL
322 pos= s1.Find("there",PR_FALSE,0,8); //first search from front using count
323 NS_ASSERTION(pos==6,"Error: Find) with offset and count"); //THIS WILL SUCCEED
325 pos= s1.Find("there",PR_FALSE,4,1); //first search from front using count
326 NS_ASSERTION(pos==-1,"Error: Find() with offset and count"); //THIS WILL FAIL
328 pos= s1.Find("there",PR_FALSE,5,2); //first search from front using count
329 NS_ASSERTION(pos==6,"Error: Find() with offset and count"); //THIS WILL SUCCEED
331 pos= s1.Find("there",PR_FALSE,6,1); //first search from front using count
332 NS_ASSERTION(pos==6,"Error: Find() with offset and count"); //THIS WILL SUCCEED
334 pos= s1.Find("there",PR_FALSE,6,0); //first search from front using a bogus count
335 NS_ASSERTION(pos==-1,"Error: Find() with offset and count"); //THIS WILL FAIL
337 pos= s1.Find("k",PR_FALSE,15,1); //first search from end using a count
338 NS_ASSERTION(pos==15,"Error: Find() with offset and count"); //THIS WILL SUCCEED
340 pos= s1.Find("k",PR_FALSE,15,10); //first search from end using a LARGE count
341 NS_ASSERTION(pos==15,"Error: Find() with offset and count"); //THIS WILL SUCCEED
343 pos= s1.Find("k",PR_FALSE,25,10); //first search from bogus offset using a LARGE count
344 NS_ASSERTION(pos==-1,"Error: Find() with offset and count"); //THIS WILL FAIL
346 pos=10;
353 PRInt32 pos= s1.RFind("ghi"); //first search from end using count
354 NS_ASSERTION(pos==6,"Error: RFind() with offset and count"); //THIS WILL SUCCEED!
356 pos= s1.RFind("nop",PR_FALSE,-1,4); //first search from end using count
357 NS_ASSERTION(pos==-1,"Error: RFind() with offset and count"); //THIS WILL FAIL
359 pos= s1.RFind("nop",PR_FALSE,-1,15); //first search from end using count
360 NS_ASSERTION(pos==13,"Error: RFind() with offset and count"); //THIS WILL SUCCEED
362 pos= s1.RFind("nop",PR_FALSE,16,3); //first search from middle using count
363 NS_ASSERTION(pos==-1,"Error: RFind() with offset and count"); //THIS WILL FAIL
365 pos= s1.RFind("nop",PR_FALSE,16,7); //first search from middle using count
366 NS_ASSERTION(pos==13,"Error: RFind() with offset and count"); //THIS WILL SUCCEED
368 pos= s1.RFind("nop",PR_FALSE,0,1); //first search from front using count
369 NS_ASSERTION(pos==-1,"Error: RFind() with offset and count"); //THIS WILL FAIL
371 pos= s1.RFind("abc",PR_FALSE,0,1); //first search from middle using count
372 NS_ASSERTION(pos==0,"Error: RFind() with offset and count"); //THIS WILL SUCCEED
374 pos= s1.RFind("foo",PR_FALSE,10,100); //first search from front using bogus count
375 NS_ASSERTION(pos==-1,"Error: RFind() with offset and count"); //THIS WILL FAIL
377 pos= s1.RFind("ghi",PR_FALSE,30,1); //first search from middle using bogus offset
378 NS_ASSERTION(pos==-1,"Error: RFind() with offset and count"); //THIS WILL FAIL
380 pos=10;
392 pos = T2.FindCharInSet("A");
393 NS_ASSERTION(kNotFound==pos,"Error in FindCharInSet");
395 pos=T2.RFindCharInSet("A",2);
396 NS_ASSERTION(kNotFound==pos,"Error in RFindCharInSet");
398 pos=T2.Find("A", PR_FALSE, 0, 1);
399 NS_ASSERTION(kNotFound==pos,"Error in Find");
401 pos=T2.RFind("A", PR_FALSE, 2, 1);
402 NS_ASSERTION(kNotFound==pos,"Error in RFind");
421 pos = T4.FindCharInSet(T5.get());
422 NS_ASSERTION(0==pos,"Error in FindcharInSet"); //This should succeed.
424 pos = T4.FindCharInSet(T6.get());
425 NS_ASSERTION(kNotFound<pos,"Error in FindcharInSet"); //This should succeed.
427 pos = T4.RFindCharInSet(T5.get(),2);
428 NS_ASSERTION(0==pos,"Error in RFindCharInSet"); //This should fail.
430 pos = T4.RFindCharInSet(T6.get(),2);
431 NS_ASSERTION(kNotFound<pos,"Error in RFindCharInSet"); //This should fail.
433 pos = T4.Find(T5.get(), PR_FALSE, 0, 1);
434 NS_ASSERTION(0==pos,"Error in Find"); //This should succeed.
436 pos= T4.Find(T6.get(), PR_FALSE, 0, 1);
437 NS_ASSERTION(kNotFound<pos,"Error in Find"); //This should fail.
439 pos = T4.RFind(T5.get(), PR_FALSE, 2, 1);
440 NS_ASSERTION(kNotFound==pos,"Error in RFind");
442 pos =T4.RFind(T6.get(), PR_FALSE, 2, 1);
443 NS_ASSERTION(kNotFound==pos,"Error in RFind");
1517 int pos,len,index;
1546 pos=theString.Length()/2;
1547 theSTLString.insert(pos,str[index],4);
1548 theString.Insert(str[index],pos);
1559 pos=theString.Length()/4;
1560 theSTLString.erase(pos,len);
1561 theString.Cut(pos,len);
1575 printf("Error in %s at:%i len:%i (%s)!\n",opStrs[theOp],pos,len,str[index]);
1580 thePrevString.Insert(str[index],pos);
1591 output<< "(" << str[index] << ", " << pos << ") ";
2259 PRInt32 pos=s0.RFind("-->");
2261 pos=s1.RFind("b");
2262 pos=s1.RFind("de",PR_FALSE,1);
2263 pos=10;
2269 PRInt32 pos=s0.Find(":");
2270 pos=10;