Advertisement
Guest User

Untitled

a guest
May 19th, 2017
59
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 1.56 KB | None | 0 0
  1. //S.A. Lowell ******************* Begin
  2.                 CString ArtistListSortedThe = ArtistListSorted.GetAt(k).Left(4);
  3.                 CString ArtistListThe = ArtistList.GetAt(j).Left(4);
  4.  
  5.                 if((ArtistListThe.CompareNoCase("the ") == 0) && (ArtistListSortedThe.CompareNoCase("the ") == 0))
  6.                 {
  7.                     ArtistListThe = ArtistList.GetAt(j).Right(ArtistList.GetAt(j).GetLength() - 4);
  8.                     ArtistListSortedThe = ArtistListSorted.GetAt(k).Right(ArtistListSorted.GetAt(k).GetLength() - 4);
  9.  
  10.                     if(ArtistListThe.CompareNoCase(ArtistListSortedThe) < 0)
  11.                     {
  12.                         ArtistListSorted.InsertAt(k, ArtistList.GetAt(j));
  13.                         added = 1;
  14.                         break;
  15.                     }
  16.                 }
  17.                 else if(ArtistListThe.CompareNoCase("the ") == 0)
  18.                 {
  19.                     ArtistListThe = ArtistList.GetAt(j).Right(ArtistList.GetAt(j).GetLength() - 4);
  20.  
  21.                     if(ArtistListThe.CompareNoCase(ArtistListSorted.GetAt(k)) < 0)
  22.                     {
  23.                         ArtistListSorted.InsertAt(k, ArtistList.GetAt(j));
  24.                         added = 1;
  25.                         break;
  26.                     }
  27.                 }
  28.                 else if(ArtistListSortedThe.CompareNoCase("the ") == 0)
  29.                 {
  30.                     ArtistListSortedThe = ArtistListSorted.GetAt(k).Right(ArtistListSorted.GetAt(k).GetLength() - 4);
  31.  
  32.                     if(ArtistList.GetAt(j).CompareNoCase(ArtistListSortedThe) < 0)
  33.                     {
  34.                         ArtistListSorted.InsertAt(k, ArtistList.GetAt(j));
  35.                         added = 1;
  36.                         break;
  37.                     }
  38.                 }
  39.                 //S.A. Lowell Changed comparison to be Case Insensitive
  40.                 //ORIGINAL: if (ArtistList.GetAt(j) < ArtistListSorted.GetAt(k)) {
  41.                 else if(ArtistList.GetAt(j).CompareNoCase(ArtistListSorted.GetAt(k)) < 0)
  42.                 {
  43.                     //S.A. Lowell ******************* End
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement