mirror of
https://github.com/ultimatepp/ultimatepp.git
synced 2026-05-16 06:05:58 -06:00
Merge continued
git-svn-id: svn://ultimatepp.org/upp/trunk@10263 f0d560ea-af0d-0410-9eb7-867de7ffcac7
This commit is contained in:
parent
2582d7f364
commit
3cd394812c
3860 changed files with 1161787 additions and 438 deletions
42
uppdev/StringComp/StringComp.cpp
Normal file
42
uppdev/StringComp/StringComp.cpp
Normal file
|
|
@ -0,0 +1,42 @@
|
|||
#include <Core/Core.h>
|
||||
|
||||
using namespace Upp;
|
||||
|
||||
CONSOLE_APP_MAIN
|
||||
{
|
||||
|
||||
ASSERT(0);
|
||||
|
||||
// start of U++ String version
|
||||
const String a = "AddFrame";
|
||||
const String b = "AddFrameSize";
|
||||
|
||||
DUMP(a < b);
|
||||
DUMP(a == b);
|
||||
DUMP(a > b);
|
||||
|
||||
DUMP(a < "AddFrameSize");
|
||||
DUMP(a == "AddFrameSize");
|
||||
DUMP(a > "AddFrameSize");
|
||||
|
||||
String less = a < b ? "true" : "false";
|
||||
String equal = a == b ? "true" : "false";
|
||||
String greater = a > b ? "true" : "false";
|
||||
// PromptOK(Format("%s-|<-|%s:-|%s&%s-|==-|%s:-|%s&%s-|>-|%s:-|%s", a, b, less, a, b, equal, a, b, greater));
|
||||
// end of U++ String version
|
||||
|
||||
|
||||
{
|
||||
// start of std::string version
|
||||
const std::string a = "AddFrame";
|
||||
const std::string b = "AddFrameSize";
|
||||
|
||||
String less = a < b ? "true" : "false";
|
||||
String equal = a == b ? "true" : "false";
|
||||
String greater = a > b ? "true" : "false";
|
||||
String au(a.c_str());
|
||||
String bu(b.c_str());
|
||||
// PromptOK(Format("%s-|<-|%s:-|%s&%s-|==-|%s:-|%s&%s-|>-|%s:-|%s", au, bu, less, au, bu, equal, au, bu, greater));
|
||||
// end of std::string version
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue