Commits

Murat Sari  committed 72b0b96

*Bug fix: If lowerCase flag is set also make the pattern lowercase for startsWith/endsWith

  • Participants
  • Parent commits dc9aa6c
  • Branches v1-9

Comments (1)

Files changed (1)

File OgreMain/src/OgreString.cpp

 
         String startOfThis = str.substr(0, patternLen);
         if (lowerCase)
+		{
+			String lowerCasePattern = pattern;
+            StringUtil::toLowerCase(lowerCasePattern);
             StringUtil::toLowerCase(startOfThis);
+			return (startOfThis == lowerCasePattern);
+		}
 
         return (startOfThis == pattern);
     }
 
         String endOfThis = str.substr(thisLen - patternLen, patternLen);
         if (lowerCase)
+		{
+			String lowerCasePattern = pattern;
+            StringUtil::toLowerCase(lowerCasePattern);
             StringUtil::toLowerCase(endOfThis);
+			return (endOfThis == lowerCasePattern);
+		}
 
         return (endOfThis == pattern);
     }