predictivesearch/PcsUtils/src/CWords.cpp
branchRCL_3
changeset 21 b3431bff8c19
parent 0 e686773b3f54
child 64 c1e8ba0c2b16
equal deleted inserted replaced
15:e8e3147d53eb 21:b3431bff8c19
    63             for (; end < textLength && !DefaultIsWordSeparator(aText[end]); ++end)
    63             for (; end < textLength && !DefaultIsWordSeparator(aText[end]); ++end)
    64                 {
    64                 {
    65                 }
    65                 }
    66             const TInt len = end-beg;
    66             const TInt len = end-beg;
    67             // Append found word to the array
    67             // Append found word to the array
    68             User::LeaveIfError(iWords.Append(aText.Mid(beg,len)));
    68             iWords.AppendL( aText.Mid(beg,len) );
    69             // Scan for next word
    69             // Scan for next word
    70             beg = end;
    70             beg = end;
    71             }
    71             }
    72         }
    72         }
    73 
    73 
    74     if (iWords.Count()==0 && textLength > 0)
    74     if (iWords.Count()==0 && textLength > 0)
    75         {
    75         {
    76         // aText is all word separator characters -> make a "word" out of those
    76         // aText is all word separator characters -> make a "word" out of those
    77         User::LeaveIfError(iWords.Append(aText));
    77         iWords.AppendL(aText);
    78         }
    78         }
    79     }
    79     }
    80 
    80 
    81 TBool CWords::DefaultIsWordSeparator(TChar aChar)
    81 TBool CWords::DefaultIsWordSeparator(TChar aChar)
    82     {
    82     {