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
adf46bd64e
commit
2e4b276e07
3860 changed files with 1161787 additions and 438 deletions
49
uppdev/String/String.cpp
Normal file
49
uppdev/String/String.cpp
Normal file
|
|
@ -0,0 +1,49 @@
|
|||
#include <Core/Core.h>
|
||||
|
||||
#include <string>
|
||||
|
||||
using namespace Upp;
|
||||
using namespace std;
|
||||
|
||||
CONSOLE_APP_MAIN
|
||||
{
|
||||
String z1((char *)NULL);
|
||||
WString z2((char *)NULL);
|
||||
WString z3((wchar *)NULL);
|
||||
|
||||
DUMP(z1.GetLength());
|
||||
DUMP(z2.GetLength());
|
||||
DUMP(z3.GetLength());
|
||||
|
||||
String x = AsString(12345) + "AsString(12345)AsString(12345)AsString(12345)";
|
||||
String y = AsString(12345) + "AsString(12345)AsString(12345)AsString(12345)";
|
||||
// __BREAK__;
|
||||
memcmp(~x, ~y, x.GetLength());
|
||||
if(x == y)
|
||||
RLOG("Match");
|
||||
/*
|
||||
String a = "Hello world!";
|
||||
DUMP(a.StartsWith("Hello"));
|
||||
DUMP(a.StartsWith("Hella"));
|
||||
DUMP(a.StartsWith(x));
|
||||
DUMP(a.EndsWith("ld!"));
|
||||
DUMP(a.EndsWith("."));
|
||||
DUMP(a.EndsWith(x));
|
||||
|
||||
|
||||
std::string sx = a;
|
||||
x = sx;
|
||||
DUMP(x);
|
||||
sx = std::string();
|
||||
sx = y.operator std::string();
|
||||
sx = y;
|
||||
x = sx;
|
||||
DUMP(x);
|
||||
|
||||
WString w = x.ToWString();
|
||||
std::wstring ww = std::wstring(w);
|
||||
WString q = ww;
|
||||
DUMP(q);
|
||||
*/
|
||||
// DUMP(q.ReverseFind('x', q.GetLength() + 1));
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue