Created
March 15, 2015 12:40
-
-
Save Paxxi/4d41e589495824689265 to your computer and use it in GitHub Desktop.
capitalize
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
refstr = " JuST Another\t\tTEst:\nWoRKs(Test 1 First) "; | |
varstr = " juST another\t\ttEst:\nwoRKs(test 1 first) "; | |
StringUtils::ToCapitalize(varstr); | |
EXPECT_STREQ(refstr.c_str(), varstr.c_str()); | |
refstr = " JuST Another\t\tTEst:\nWoRKs\"Test 1 First\" "; | |
varstr = " juST another\t\ttEst:\nwoRKs\"test 1 first\" "; | |
StringUtils::ToCapitalize(varstr); | |
EXPECT_STREQ(refstr.c_str(), varstr.c_str()); | |
refstr = "N.Y.P.D"; | |
varstr = "n.y.p.d"; | |
StringUtils::ToCapitalize(varstr); | |
EXPECT_STREQ(refstr.c_str(), varstr.c_str()); | |
refstr = "N-Y-P-D"; | |
varstr = "n-y-p-d"; | |
StringUtils::ToCapitalize(varstr); | |
EXPECT_STREQ(refstr.c_str(), varstr.c_str()); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment