[2.2.1]String::Contains() seems to block for long time for very long String. Remove...
authordahyeong.kim <dahyeong.kim@samsung.com>
Wed, 25 Sep 2013 01:51:55 +0000 (10:51 +0900)
committerDaHyeong Kim <dahyeong.kim@samsung.com>
Wed, 25 Sep 2013 02:09:40 +0000 (02:09 +0000)
Change-Id: I6674f0f7691c7a2cee8de105c68429ce55b8d757
Signed-off-by: dahyeong.kim <dahyeong.kim@samsung.com>
src/base/FBaseString.cpp

index bf69291..709adb9 100644 (file)
@@ -1425,18 +1425,7 @@ String::Contains(const String& str) const
                return true;
        }
 
-       wchar_t* pStart = __pValue;
-       wchar_t* pEnd = pStart + __length;
-       while (pStart < pEnd)
-       {
-               while (wcsstr(pStart, str.__pValue) != null)
-               {
-                       return true;
-               }
-               ++pStart;
-       }
-
-       return false;
+       return (wcsstr(__pValue, str.__pValue) != null);
 }
 
 bool