summaryrefslogtreecommitdiff
path: root/indra/llui/lluistring.h
diff options
context:
space:
mode:
authorSteven Bennetts <steve@lindenlab.com>2008-06-26 00:39:00 +0000
committerSteven Bennetts <steve@lindenlab.com>2008-06-26 00:39:00 +0000
commit25c10ed028da5c547b11f1f461916897272b0e6d (patch)
tree350a5858f8970b6e28b2dc395625d74d8bd597b2 /indra/llui/lluistring.h
parent6dd125d375b38455997a0c4b8747659f4c2351aa (diff)
QAR-628 merge string-cleanup-5 -r 90476:90508 -> release
dataserver-is-deprecated
Diffstat (limited to 'indra/llui/lluistring.h')
-rw-r--r--indra/llui/lluistring.h34
1 files changed, 17 insertions, 17 deletions
diff --git a/indra/llui/lluistring.h b/indra/llui/lluistring.h
index dd787baafe..773bc09763 100644
--- a/indra/llui/lluistring.h
+++ b/indra/llui/lluistring.h
@@ -1,7 +1,7 @@
/**
* @file lluistring.h
* @author: Steve Bennetts
- * @brief A fancy wrapper for LLString supporting argument substitutions.
+ * @brief A fancy wrapper for std::string supporting argument substitutions.
*
* $LicenseInfo:firstyear=2006&license=viewergpl$
*
@@ -47,15 +47,15 @@
// LLUIString mMessage("Welcome [USERNAME] to [SECONDLIFE]!");
// mMessage.setArg("[USERNAME]", "Steve");
// mMessage.setArg("[SECONDLIFE]", "Second Life");
-// llinfos << mMessage.getString().c_str() << llendl; // outputs "Welcome Steve to Second Life"
+// llinfos << mMessage.getString() << llendl; // outputs "Welcome Steve to Second Life"
// mMessage.setArg("[USERNAME]", "Joe");
-// llinfos << mMessage.getString().c_str() << llendl; // outputs "Welcome Joe to Second Life"
+// llinfos << mMessage.getString() << llendl; // outputs "Welcome Joe to Second Life"
// mMessage = "Recepción a la [SECONDLIFE] [USERNAME]"
// mMessage.setArg("[SECONDLIFE]", "Segunda Vida");
-// llinfos << mMessage.getString().c_str() << llendl; // outputs "Recepción a la Segunda Vida Joe"
+// llinfos << mMessage.getString() << llendl; // outputs "Recepción a la Segunda Vida Joe"
// Implementation Notes:
-// Attempting to have operator[](const LLString& s) return mArgs[s] fails because we have
+// Attempting to have operator[](const std::string& s) return mArgs[s] fails because we have
// to call format() after the assignment happens.
class LLUIString
@@ -64,17 +64,17 @@ public:
// These methods all perform appropriate argument substitution
// and modify mOrig where appropriate
LLUIString() {}
- LLUIString(const LLString& instring, const LLString::format_map_t& args);
- LLUIString(const LLString& instring) { assign(instring); }
+ LLUIString(const std::string& instring, const LLStringUtil::format_map_t& args);
+ LLUIString(const std::string& instring) { assign(instring); }
- void assign(const LLString& instring);
- LLUIString& operator=(const LLString& s) { assign(s); return *this; }
+ void assign(const std::string& instring);
+ LLUIString& operator=(const std::string& s) { assign(s); return *this; }
- void setArgList(const LLString::format_map_t& args);
- void setArg(const LLString& key, const LLString& replacement);
+ void setArgList(const LLStringUtil::format_map_t& args);
+ void setArg(const std::string& key, const std::string& replacement);
- const LLString& getString() const { return mResult; }
- operator LLString() const { return mResult; }
+ const std::string& getString() const { return mResult; }
+ operator std::string() const { return mResult; }
const LLWString& getWString() const { return mWResult; }
operator LLWString() const { return mWResult; }
@@ -92,15 +92,15 @@ public:
void insert(S32 charidx, const LLWString& wchars);
void replace(S32 charidx, llwchar wc);
- static const LLString::format_map_t sNullArgs;
+ static const LLStringUtil::format_map_t sNullArgs;
private:
void format();
- LLString mOrig;
- LLString mResult;
+ std::string mOrig;
+ std::string mResult;
LLWString mWResult; // for displaying
- LLString::format_map_t mArgs;
+ LLStringUtil::format_map_t mArgs;
};
#endif // LL_LLUISTRING_H