@@ -173,7 +173,7 @@ namespace cppstringstests
173173 {
174174 size_t found_pos;
175175
176- pcs::CppString test{ " ABC0123456789." };
176+ pcs::CppString test{ " ABC0123456789.ABC0123456789. " };
177177 for (int c = 0 ; c <= 255 ; ++c) {
178178 char ch{ char (c) };
179179 Assert::AreEqual (test.MyBaseClass ::find (ch), test.find (ch));
@@ -221,12 +221,14 @@ namespace cppstringstests
221221 Assert::AreEqual (found_pos, test.find (str, 2 , pcs::CppString::size_type (5 + 2 - 1 )) - 2 );
222222 }
223223 }
224- Assert::AreEqual (pcs::CppString::npos, test.find (" A" , 1 ));
224+ Assert::AreEqual (size_t (14 ), test.find (" A" , 1 ));
225+ Assert::AreEqual (pcs::CppString::npos, test.find (" A" , 15 ));
225226 Assert::AreEqual (size_t (0 ), test.find (" " ));
226- Assert::AreEqual (pcs::CppString::npos, test.find (" ." , 14 ));
227+ Assert::AreEqual (size_t (27 ), test.find (" ." , 14 ));
228+ Assert::AreEqual (pcs::CppString::npos, test.find (" ." , 28 ));
227229 Assert::AreEqual (size_t (13 ), test.find (" ." , 13 ));
228230
229- pcs::CppWString wtest{ L" ABC0123456789." };
231+ pcs::CppWString wtest{ L" ABC0123456789.ABC0123456789. " };
230232 for (int wc = 0 ; wc <=0xffff ; ++wc) {
231233 wchar_t wch{ wchar_t (wc) };
232234
@@ -275,34 +277,76 @@ namespace cppstringstests
275277 Assert::AreEqual (found_pos, wtest.find (wstr, 2 , pcs::CppString::size_type (5 + 2 - 1 )) - 2 );
276278 }
277279 }
278- Assert::AreEqual (pcs::CppString::npos, wtest.find (L" A" , 1 ));
280+ Assert::AreEqual (size_t (14 ), wtest.find (L" A" , 1 ));
281+ Assert::AreEqual (pcs::CppString::npos, wtest.find (L" A" , 15 ));
279282 Assert::AreEqual (size_t (0 ), wtest.find (L" " ));
280- Assert::AreEqual (pcs::CppString::npos, wtest.find (L" ." , 14 ));
283+ Assert::AreEqual (size_t (27 ), wtest.find (L" ." , 14 ));
284+ Assert::AreEqual (pcs::CppString::npos, wtest.find (L" ." , 28 ));
281285 Assert::AreEqual (size_t (13 ), wtest.find (L" ." , 13 ));
282286 }
283287
284288 TEST_METHOD (find_n)
285289 {
286- // notice: find_n() is fully tested via TEST_METHOD(find)
287- pcs::CppString test{ " ABC0123456789." };
290+ size_t found_pos;
291+
292+ pcs::CppString test{ " ABC0123456789.ABC0123456789." };
288293 for (int c = 0 ; c <= 255 ; ++c) {
289294 char ch{ char (c) };
290- Assert::AreEqual (test.substr (2 ).MyBaseClass ::find (ch), test.find_n (ch, 2 , -1 ));
291- Assert::AreEqual (test.substr (0 , 2 ).MyBaseClass ::find (ch), test.find_n (ch, 2 ));
292- Assert::AreEqual (test.substr (2 , 5 ).MyBaseClass ::find (ch), test.find_n (ch, 2 , 5 ));
295+ Assert::AreEqual (test.MyBaseClass ::find (ch), test.find_n (ch, size_t (-1 )));
296+
297+ found_pos = test.substr (2 ).MyBaseClass ::find (ch);
298+ if (found_pos == pcs::CppString::npos)
299+ Assert::AreEqual (found_pos, test.find_n (ch, 2 ));
300+ else
301+ Assert::AreEqual (found_pos, test.substr (2 ).find_n (ch, test.size () - 2 ));
302+
303+ found_pos = test.substr (2 , 5 ).MyBaseClass ::find (ch);
304+ if (found_pos == pcs::CppString::npos)
305+ Assert::AreEqual (found_pos, test.find_n (ch, 2 , pcs::CppString::size_type (5 )));
306+ else
307+ Assert::AreEqual (found_pos, test.find_n (ch, 2 , pcs::CppString::size_type (5 )) - 2 );
293308
294309 CppString s (ch);
295- Assert::AreEqual (test.substr (2 ).MyBaseClass ::find (s), test.find_n (s, 2 , -1 ));
296- Assert::AreEqual (test.substr (0 , 2 ).MyBaseClass ::find (s), test.find_n (s, 2 ));
297- Assert::AreEqual (test.substr (3 , 5 ).MyBaseClass ::find (s), test.find_n (s, 3 , 5 ));
298-
299- char str[2 ]{ ch, 0 };
300- Assert::AreEqual (test.substr (2 ).MyBaseClass ::find (str), test.find_n (str, 2 , -1 ));
301- Assert::AreEqual (test.substr (0 , 2 ).MyBaseClass ::find (str), test.find_n (str, 2 ));
302- Assert::AreEqual (test.substr (3 , 5 ).MyBaseClass ::find (str), test.find_n (str, 3 , 5 ));
310+ Assert::AreEqual (test.MyBaseClass ::find (s), test.find_n (s, size_t (-1 )));
311+ found_pos = test.substr (2 ).MyBaseClass ::find (s);
312+ if (found_pos == pcs::CppString::npos)
313+ Assert::AreEqual (found_pos, test.find_n (s, 2 ));
314+ else
315+ Assert::AreEqual (found_pos, test.substr (2 ).find_n (s, test.size () - 2 ));
316+
317+ found_pos = test.substr (2 , 5 ).MyBaseClass ::find (s);
318+ if (found_pos == pcs::CppString::npos)
319+ Assert::AreEqual (found_pos, test.find_n (s, 2 , pcs::CppString::size_type (5 )));
320+ else
321+ Assert::AreEqual (found_pos, test.find_n (s, 2 , pcs::CppString::size_type (5 )) - 2 );
322+
323+ if (c > 0 ) {
324+ char str[2 ]{ ch, 0 };
325+ Assert::AreEqual (test.MyBaseClass ::find (str), test.find_n (str, size_t (-1 )));
326+
327+ found_pos = test.substr (2 ).MyBaseClass ::find (str);
328+ if (found_pos == pcs::CppString::npos)
329+ Assert::AreEqual (found_pos, test.find_n (str, test.size () - 2 ));
330+ else
331+ Assert::AreEqual (found_pos, test.substr (2 ).find_n (str, test.size () - 2 ));
332+
333+ found_pos = test.substr (2 , 5 ).MyBaseClass ::find (str);
334+ if (found_pos == pcs::CppString::npos)
335+ Assert::AreEqual (found_pos, test.find_n (str, 2 , pcs::CppString::size_type (5 )));
336+ else
337+ Assert::AreEqual (found_pos, test.find_n (str, 2 , pcs::CppString::size_type (5 )) - 2 );
338+ }
303339 }
340+ Assert::AreEqual (size_t (14 ), test.find_n (" A" , 1 , test.size () - 1 ));
341+ Assert::AreEqual (pcs::CppString::npos, test.find_n (" A" , 15 , 1 ));
342+ Assert::AreEqual (size_t (0 ), test.find_n (" " , size_t (-1 )));
343+ Assert::AreEqual (size_t (27 ), test.find_n (" ." , 14 , test.size () - 14 ));
344+ Assert::AreEqual (pcs::CppString::npos, test.find_n (" ." , 28 , 1 ));
345+ Assert::AreEqual (size_t (13 ), test.find_n (" ." , 13 , test.size () - 13 ));
304346
305- pcs::CppWString wtest{ L" ABC0123456789." };
347+
348+ /*
349+ pcs::CppWString wtest{L"ABC0123456789.ABC0123456789."};
306350 for (int wc = 0; wc <= 0xffff; ++wc) {
307351 wchar_t wch{ wchar_t(wc) };
308352 Assert::AreEqual(wtest.substr(2).MyBaseClass::find(wch), wtest.find_n(wch, 2, -1));
@@ -319,6 +363,62 @@ namespace cppstringstests
319363 Assert::AreEqual(wtest.substr(0, 2).MyBaseClass::find(wstr), wtest.find_n(wstr, 2));
320364 Assert::AreEqual(wtest.substr(3, 5).MyBaseClass::find(wstr), wtest.find_n(wstr, 3, 5));
321365 }
366+ */
367+ pcs::CppWString wtest{ L" ABC0123456789.ABC0123456789." };
368+ for (int wc = 0 ; wc <= 0xffff ; ++wc) {
369+ wchar_t wch{ wchar_t (wc) };
370+ Assert::AreEqual (wtest.MyBaseClass ::find (wch), wtest.find_n (wch, size_t (-1 )));
371+
372+ found_pos = wtest.substr (2 ).MyBaseClass ::find (wch);
373+ if (found_pos == pcs::CppString::npos)
374+ Assert::AreEqual (found_pos, wtest.find_n (wch, 2 ));
375+ else
376+ Assert::AreEqual (found_pos, wtest.substr (2 ).find_n (wch, wtest.size () - 2 ));
377+
378+ found_pos = wtest.substr (2 , 5 ).MyBaseClass ::find (wch);
379+ if (found_pos == pcs::CppString::npos)
380+ Assert::AreEqual (found_pos, wtest.find_n (wch, 2 , pcs::CppString::size_type (5 )));
381+ else
382+ Assert::AreEqual (found_pos, wtest.find_n (wch, 2 , pcs::CppString::size_type (5 )) - 2 );
383+
384+ CppWString ws (wch);
385+ Assert::AreEqual (wtest.MyBaseClass ::find (ws), wtest.find_n (ws, size_t (-1 )));
386+ found_pos = wtest.substr (2 ).MyBaseClass ::find (ws);
387+ if (found_pos == pcs::CppString::npos)
388+ Assert::AreEqual (found_pos, wtest.find_n (ws, 2 ));
389+ else
390+ Assert::AreEqual (found_pos, wtest.substr (2 ).find_n (ws, wtest.size () - 2 ));
391+
392+ found_pos = wtest.substr (2 , 5 ).MyBaseClass ::find (ws);
393+ if (found_pos == pcs::CppString::npos)
394+ Assert::AreEqual (found_pos, wtest.find_n (ws, 2 , pcs::CppString::size_type (5 )));
395+ else
396+ Assert::AreEqual (found_pos, wtest.find_n (ws, 2 , pcs::CppString::size_type (5 )) - 2 );
397+
398+ if (wc > 0 ) {
399+ wchar_t wstr[2 ]{ wch, 0 };
400+ Assert::AreEqual (wtest.MyBaseClass ::find (wstr), wtest.find_n (wstr, size_t (-1 )));
401+
402+ found_pos = wtest.substr (2 ).MyBaseClass ::find (wstr);
403+ if (found_pos == pcs::CppString::npos)
404+ Assert::AreEqual (found_pos, wtest.find_n (wstr, wtest.size () - 2 ));
405+ else
406+ Assert::AreEqual (found_pos, wtest.substr (2 ).find_n (wstr, wtest.size () - 2 ));
407+
408+ found_pos = wtest.substr (2 , 5 ).MyBaseClass ::find (wstr);
409+ if (found_pos == pcs::CppString::npos)
410+ Assert::AreEqual (found_pos, wtest.find_n (wstr, 2 , pcs::CppString::size_type (5 )));
411+ else
412+ Assert::AreEqual (found_pos, wtest.find_n (wstr, 2 , pcs::CppString::size_type (5 )) - 2 );
413+ }
414+ }
415+ Assert::AreEqual (size_t (14 ), wtest.find_n (L" A" , 1 , wtest.size () - 1 ));
416+ Assert::AreEqual (pcs::CppString::npos, wtest.find_n (L" A" , 15 , 1 ));
417+ Assert::AreEqual (size_t (0 ), wtest.find_n (L" " , size_t (-1 )));
418+ Assert::AreEqual (size_t (27 ), wtest.find_n (L" ." , 14 , wtest.size () - 14 ));
419+ Assert::AreEqual (pcs::CppString::npos, wtest.find_n (L" ." , 28 , 1 ));
420+ Assert::AreEqual (size_t (13 ), wtest.find_n (L" ." , 13 , wtest.size () - 13 ));
421+
322422 }
323423
324424 TEST_METHOD (index_char)
@@ -328,18 +428,20 @@ namespace cppstringstests
328428 string_type test{ " ABC0123456789." };
329429 char ch{ ' 3' };
330430 Assert::AreEqual (test.MyBaseClass ::find (ch), test.index (ch));
331- Assert::AreEqual (test.substr (2 ).MyBaseClass ::find (ch), test.index (ch, 2 ));
332- Assert::AreEqual (test.substr (2 , 5 ).MyBaseClass ::find (ch), test.index (ch, 2 , string_type::size_type (5 + 2 - 1 )));
431+ Assert::AreEqual (test.substr (2 ).MyBaseClass ::find (ch), test.index (ch, 2 ) - 2 );
432+ Assert::AreEqual (test.substr (2 , 5 ).MyBaseClass ::find (ch), test.index (ch, 2 , string_type::size_type (5 + 2 - 1 )) - 2 );
333433 try {
334434 const string_type::size_type pos = test.index (' z' );
335435 Assert::IsTrue (pos != pcs::CppString::npos);
336436 }
337437 catch (const string_type::NotFoundException e) { /* ok case! */ }
438+
338439 try {
339440 const string_type::size_type pos = test.index (' z' , 2 );
340441 Assert::IsTrue (pos != string_type::npos);
341442 }
342443 catch (const string_type::NotFoundException e) { /* ok case! */ }
444+
343445 try {
344446 const string_type::size_type pos = test.index (' z' , 2 , 5 +2 -1 );
345447 Assert::IsTrue (pos != string_type::npos);
@@ -348,19 +450,21 @@ namespace cppstringstests
348450
349451 string_type s (ch);
350452 Assert::AreEqual (test.MyBaseClass ::find (s), test.index (s));
351- Assert::AreEqual (test.substr (2 ).MyBaseClass ::find (s), test.index (s, 2 ));
352- Assert::AreEqual (test.substr (3 , 5 ).MyBaseClass ::find (s), test.index (s, 3 , string_type::size_type (5 + 3 - 1 )));
453+ Assert::AreEqual (test.substr (2 ).MyBaseClass ::find (s), test.index (s, 2 ) - 2 );
454+ Assert::AreEqual (test.substr (3 , 5 ).MyBaseClass ::find (s), test.index (s, 3 , string_type::size_type (5 + 3 - 1 )) - 3 );
353455 s = ' z' ;
354456 try {
355457 const string_type::size_type pos = test.index (s);
356458 Assert::IsTrue (pos != string_type::npos);
357459 }
358460 catch (const string_type::NotFoundException e) { /* ok case! */ }
461+
359462 try {
360463 const string_type::size_type pos = test.index (s, 2 );
361464 Assert::IsTrue (pos != string_type::npos);
362465 }
363466 catch (const string_type::NotFoundException e) { /* ok case! */ }
467+
364468 try {
365469 const string_type::size_type pos = test.index (s, 2 , string_type::size_type (5 + 2 - 1 ));
366470 Assert::IsTrue (pos != string_type::npos);
@@ -369,19 +473,21 @@ namespace cppstringstests
369473
370474 char str[2 ]{ ch, 0 };
371475 Assert::AreEqual (test.MyBaseClass ::find (str), test.index (str));
372- Assert::AreEqual (test.substr (2 ).MyBaseClass ::find (str), test.index (str, 2 ));
373- Assert::AreEqual (test.substr (3 , 5 ).MyBaseClass ::find (str), test.index (str, 3 , string_type::size_type (5 + 3 - 1 )));
476+ Assert::AreEqual (test.substr (2 ).MyBaseClass ::find (str), test.index (str, 2 ) - 2 );
477+ Assert::AreEqual (test.substr (3 , 5 ).MyBaseClass ::find (str), test.index (str, 3 , string_type::size_type (5 + 3 - 1 )) - 3 );
374478 str[0 ] = ' z' ;
375479 try {
376480 const string_type::size_type pos = test.index (s);
377481 Assert::IsTrue (pos != string_type::npos);
378482 }
379483 catch (const string_type::NotFoundException e) { /* ok case! */ }
484+
380485 try {
381486 const string_type::size_type pos = test.index (s, 2 );
382487 Assert::IsTrue (pos != string_type::npos);
383488 }
384489 catch (const string_type::NotFoundException e) { /* ok case! */ }
490+
385491 try {
386492 const string_type::size_type pos = test.index (s, 2 , string_type::size_type (5 + 2 - 1 ));
387493 Assert::IsTrue (pos != string_type::npos);
@@ -396,39 +502,43 @@ namespace cppstringstests
396502 string_type test ( L" ABC0123456789." );
397503 wchar_t ch{ L' 3' };
398504 Assert::AreEqual (test.MyBaseClass ::find (ch), test.index (ch));
399- Assert::AreEqual (test.substr (2 ).MyBaseClass ::find (ch), test.index (ch, 2 ));
400- Assert::AreEqual (test.substr (2 , 5 ).MyBaseClass ::find (ch), test.index (ch, 2 , string_type::size_type (5 + 2 - 1 )));
505+ Assert::AreEqual (test.substr (2 ).MyBaseClass ::find (ch), test.index (ch, 2 ) - 2 );
506+ Assert::AreEqual (test.substr (2 , 5 ).MyBaseClass ::find (ch), test.index (ch, 2 , string_type::size_type (5 + 2 - 1 )) - 2 );
401507 try {
402508 const string_type::size_type pos = test.index (' z' );
403509 Assert::IsTrue (pos != pcs::CppString::npos);
404510 }
405511 catch (const string_type::NotFoundException e) { /* ok case! */ }
512+
406513 try {
407514 const string_type::size_type pos = test.index (' z' , 2 );
408515 Assert::IsTrue (pos != string_type::npos);
409516 }
410517 catch (const string_type::NotFoundException e) { /* ok case! */ }
518+
411519 try {
412- const string_type::size_type pos = test.index (' z' , 2 , 5 + 2 - 1 );
520+ const string_type::size_type pos = test.index (' z' , 2 , string_type::size_type ( 5 + 2 - 1 ) );
413521 Assert::IsTrue (pos != string_type::npos);
414522 }
415523 catch (const string_type::NotFoundException e) { /* ok case! */ }
416524
417525 string_type s (ch);
418526 Assert::AreEqual (test.MyBaseClass ::find (s), test.index (s));
419- Assert::AreEqual (test.substr (2 ).MyBaseClass ::find (s), test.index (s, 2 ));
420- Assert::AreEqual (test.substr (3 , 5 ).MyBaseClass ::find (s), test.index (s, 3 , string_type::size_type (5 + 3 - 1 )));
527+ Assert::AreEqual (test.substr (2 ).MyBaseClass ::find (s), test.index (s, 2 ) - 2 );
528+ Assert::AreEqual (test.substr (3 , 5 ).MyBaseClass ::find (s), test.index (s, 3 , string_type::size_type (5 + 3 - 1 )) - 3 );
421529 s = ' z' ;
422530 try {
423531 const string_type::size_type pos = test.index (s);
424532 Assert::IsTrue (pos != string_type::npos);
425533 }
426534 catch (const string_type::NotFoundException e) { /* ok case! */ }
535+
427536 try {
428537 const string_type::size_type pos = test.index (s, 2 );
429538 Assert::IsTrue (pos != string_type::npos);
430539 }
431540 catch (const string_type::NotFoundException e) { /* ok case! */ }
541+
432542 try {
433543 const string_type::size_type pos = test.index (s, 2 , string_type::size_type (5 + 2 - 1 ));
434544 Assert::IsTrue (pos != string_type::npos);
@@ -437,19 +547,21 @@ namespace cppstringstests
437547
438548 wchar_t str[2 ]{ ch, 0 };
439549 Assert::AreEqual (test.MyBaseClass ::find (str), test.index (str));
440- Assert::AreEqual (test.substr (2 ).MyBaseClass ::find (str), test.index (str, 2 ));
441- Assert::AreEqual (test.substr (3 , 5 ).MyBaseClass ::find (str), test.index (str, 3 , string_type::size_type (5 + 3 - 1 )));
550+ Assert::AreEqual (test.substr (2 ).MyBaseClass ::find (str), test.index (str, 2 ) - 2 );
551+ Assert::AreEqual (test.substr (3 , 5 ).MyBaseClass ::find (str), test.index (str, 3 , string_type::size_type (5 + 3 - 1 )) - 3 );
442552 str[0 ] = ' z' ;
443553 try {
444554 const string_type::size_type pos = test.index (s);
445555 Assert::IsTrue (pos != string_type::npos);
446556 }
447557 catch (const string_type::NotFoundException e) { /* ok case! */ }
558+
448559 try {
449560 const string_type::size_type pos = test.index (s, 2 );
450561 Assert::IsTrue (pos != string_type::npos);
451562 }
452563 catch (const string_type::NotFoundException e) { /* ok case! */ }
564+
453565 try {
454566 const string_type::size_type pos = test.index (s, 2 , string_type::size_type (5 + 2 - 1 ));
455567 Assert::IsTrue (pos != string_type::npos);
@@ -464,7 +576,7 @@ namespace cppstringstests
464576 pcs::CppString test{ " ABC0123456789." };
465577 char ch{ ' 3' };
466578 Assert::AreEqual (test.substr (0 , 20 ).MyBaseClass ::find (ch), test.index_n (ch, 20 ));
467- Assert::AreEqual (test.substr (2 , 5 ).MyBaseClass ::find (ch), test.index_n (ch, 2 , 5 ));
579+ Assert::AreEqual (test.substr (2 , 5 ).MyBaseClass ::find (ch), test.index_n (ch, 2 , 5 ) - 2 );
468580 try {
469581 const string_type::size_type pos = test.index_n (' z' , 20 );
470582 Assert::IsTrue (pos != string_type::npos);
@@ -478,7 +590,7 @@ namespace cppstringstests
478590
479591 CppString s (ch);
480592 Assert::AreEqual (test.substr (0 , 20 ).MyBaseClass ::find (s), test.index_n (s, 20 ));
481- Assert::AreEqual (test.substr (3 , 5 ).MyBaseClass ::find (s), test.index_n (s, 3 , 5 ));
593+ Assert::AreEqual (test.substr (3 , 5 ).MyBaseClass ::find (s), test.index_n (s, 3 , 5 ) - 3 );
482594 s = ' z' ;
483595 try {
484596 const string_type::size_type pos = test.index_n (s, 20 );
@@ -493,7 +605,7 @@ namespace cppstringstests
493605
494606 char str[2 ]{ ch, 0 };
495607 Assert::AreEqual (test.substr (0 , 20 ).MyBaseClass ::find (str), test.index_n (str, 20 ));
496- Assert::AreEqual (test.substr (3 , 5 ).MyBaseClass ::find (str), test.index_n (str, 3 , 5 ));
608+ Assert::AreEqual (test.substr (3 , 5 ).MyBaseClass ::find (str), test.index_n (str, 3 , 5 ) - 3 );
497609 str[0 ] = ' z' ;
498610 try {
499611 const string_type::size_type pos = test.index_n (s, 20 );
@@ -514,7 +626,7 @@ namespace cppstringstests
514626 string_type test{ L" ABC0123456789." };
515627 wchar_t ch{ L' 3' };
516628 Assert::AreEqual (test.substr (0 , 20 ).MyBaseClass ::find (ch), test.index_n (ch, 20 ));
517- Assert::AreEqual (test.substr (2 , 5 ).MyBaseClass ::find (ch), test.index_n (ch, 2 , 5 ));
629+ Assert::AreEqual (test.substr (2 , 5 ).MyBaseClass ::find (ch), test.index_n (ch, 2 , 5 ) - 2 );
518630 try {
519631 const string_type::size_type pos = test.index_n (' z' , 20 );
520632 Assert::IsTrue (pos != string_type::npos);
@@ -528,7 +640,7 @@ namespace cppstringstests
528640
529641 string_type s (ch);
530642 Assert::AreEqual (test.substr (0 , 20 ).MyBaseClass ::find (s), test.index_n (s, 20 ));
531- Assert::AreEqual (test.substr (3 , 5 ).MyBaseClass ::find (s), test.index_n (s, 3 , 5 ));
643+ Assert::AreEqual (test.substr (3 , 5 ).MyBaseClass ::find (s), test.index_n (s, 3 , 5 ) - 3 );
532644 try {
533645 const string_type::size_type pos = test.index_n (s, 20 );
534646 Assert::IsTrue (pos != string_type::npos);
@@ -542,7 +654,7 @@ namespace cppstringstests
542654
543655 wchar_t str[2 ]{ ch, 0 };
544656 Assert::AreEqual (test.substr (0 , 20 ).MyBaseClass ::find (str), test.index_n (str, 20 ));
545- Assert::AreEqual (test.substr (3 , 5 ).MyBaseClass ::find (str), test.index_n (str, 3 , 5 ));
657+ Assert::AreEqual (test.substr (3 , 5 ).MyBaseClass ::find (str), test.index_n (str, 3 , 5 ) - 3 );
546658 str[0 ] = L' z' ;
547659 try {
548660 const string_type::size_type pos = test.index_n (s, 20 );
@@ -1132,6 +1244,5 @@ namespace cppstringstests
11321244 Assert::AreEqual (pcs::CppString::npos, wtest.rfind (L" ." , 14 ));
11331245 Assert::AreEqual (size_t (13 ), wtest.rfind (L" ." , 13 ));
11341246 }
1135-
11361247 };
11371248}
0 commit comments