Limbo
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
test_compare.cpp
Go to the documentation of this file.
1 
7 #include <iostream>
8 #include <string>
9 #include <limbo/string/String.h>
10 
13 int main()
14 {
15  std::string s1 = "limbo2343slimbo";
16  std::string s2 = "LiMbo2343SliMbo";
17 
18  if (s1 == s2)
19  std::cout << "string " << s1 << " and " << s2 << " is equal case-sensitive\n";
20  else
21  std::cout << "string " << s1 << " and " << s2 << " is not equal case-sensitive\n";
22 
23  if (limbo::iequals(s1, s2))
24  std::cout << "string " << s1 << " and " << s2 << " is equal case-insensitive\n";
25  else
26  std::cout << "string " << s1 << " and " << s2 << " is not equal case-insensitive\n";
27 
28  return 0;
29 }
int main()
main function
bool iequals(string const &s1, string const &s2)
check two strings equal, case-insensitive
Definition: String.h:108
Check string is integer, floating point, number... Convert string to upper/lower cases.