summaryrefslogtreecommitdiff
path: root/core/include/fxcrt/fx_string.h
diff options
context:
space:
mode:
Diffstat (limited to 'core/include/fxcrt/fx_string.h')
-rw-r--r--core/include/fxcrt/fx_string.h7
1 files changed, 7 insertions, 0 deletions
diff --git a/core/include/fxcrt/fx_string.h b/core/include/fxcrt/fx_string.h
index 44c6fc53ff..91032f9d97 100644
--- a/core/include/fxcrt/fx_string.h
+++ b/core/include/fxcrt/fx_string.h
@@ -184,6 +184,13 @@ public:
static CFX_ByteString FromUnicode(const CFX_WideString& str);
+ // Explicit conversion to raw string
+ FX_LPCSTR c_str() const
+ {
+ return m_pData ? m_pData->m_String : "";
+ }
+
+ // Implicit conversion to C-style string -- deprecated
operator FX_LPCSTR() const
{
return m_pData ? m_pData->m_String : "";