Class FString: More data types for the + operator
This commit is contained in:
parent
a20a1d8b38
commit
35a50fdbd7
|
@ -720,6 +720,14 @@ const FString operator + (const FString& s1, const FString& s2)
|
||||||
return (tmp);
|
return (tmp);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//----------------------------------------------------------------------
|
||||||
|
const FString operator + (const FString& s, const wchar_t c)
|
||||||
|
{
|
||||||
|
FString tmp(s);
|
||||||
|
tmp._insert ( uInt(wcslen(s.wc_str())), 1, &c);
|
||||||
|
return (tmp);
|
||||||
|
}
|
||||||
|
|
||||||
//----------------------------------------------------------------------
|
//----------------------------------------------------------------------
|
||||||
const FString operator + (const std::wstring& s1, const FString& s2)
|
const FString operator + (const std::wstring& s1, const FString& s2)
|
||||||
{
|
{
|
||||||
|
@ -776,6 +784,14 @@ const FString operator + (const char c, const FString& s)
|
||||||
return (tmp);
|
return (tmp);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//----------------------------------------------------------------------
|
||||||
|
const FString operator + (const wchar_t c, const std::wstring& s)
|
||||||
|
{
|
||||||
|
FString tmp(c);
|
||||||
|
tmp._insert (1, uInt(s.length()), s.c_str());
|
||||||
|
return (tmp);
|
||||||
|
}
|
||||||
|
|
||||||
//----------------------------------------------------------------------
|
//----------------------------------------------------------------------
|
||||||
wchar_t& FString::operator [] (uInt pos)
|
wchar_t& FString::operator [] (uInt pos)
|
||||||
{
|
{
|
||||||
|
|
|
@ -192,12 +192,14 @@ class FString
|
||||||
const FString operator + (const char);
|
const FString operator + (const char);
|
||||||
|
|
||||||
friend const FString operator + (const FString&, const FString&);
|
friend const FString operator + (const FString&, const FString&);
|
||||||
|
friend const FString operator + (const FString&, const wchar_t);
|
||||||
friend const FString operator + (const std::wstring&, const FString&);
|
friend const FString operator + (const std::wstring&, const FString&);
|
||||||
friend const FString operator + (const wchar_t*, const FString&);
|
friend const FString operator + (const wchar_t*, const FString&);
|
||||||
friend const FString operator + (const std::string&, const FString&);
|
friend const FString operator + (const std::string&, const FString&);
|
||||||
friend const FString operator + (const char*, const FString&);
|
friend const FString operator + (const char*, const FString&);
|
||||||
friend const FString operator + (const wchar_t, const FString&);
|
friend const FString operator + (const wchar_t, const FString&);
|
||||||
friend const FString operator + (const char, const FString&);
|
friend const FString operator + (const char, const FString&);
|
||||||
|
friend const FString operator + (const wchar_t, const std::wstring&);
|
||||||
|
|
||||||
wchar_t& operator [] (uInt);
|
wchar_t& operator [] (uInt);
|
||||||
const FString operator () (uInt, uInt);
|
const FString operator () (uInt, uInt);
|
||||||
|
|
Loading…
Reference in New Issue