/xbmc/visualizations/Vortex/angelscript/docs/manual/doc_addon_std_string.html
http://github.com/xbmc/xbmc · HTML · 54 lines · 53 code · 0 blank · 1 comment · 0 complexity · e0864a2fae281a00670319c75fd2bdea MD5 · raw file
- <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
- <html><head><meta http-equiv="Content-Type" content="text/html;charset=UTF-8">
- <title>AngelScript: string object (STL)</title>
- <link href="tabs.css" rel="stylesheet" type="text/css">
- <link href="doxygen.css" rel="stylesheet" type="text/css">
- </head><body>
- <!-- Generated by Doxygen 1.5.9 -->
- <div class="contents">
- <h1><a class="anchor" name="doc_addon_std_string">string object (STL) </a></h1><b>Path:</b> /sdk/add_on/scriptstdstring/<p>
- This add-on registers the <code>std::string</code> type as-is with AngelScript. This gives perfect compatibility with C++ functions that use <code>std::string</code> in parameters or as return type.<p>
- A potential drawback is that the <code>std::string</code> type is a value type, thus may increase the number of copies taken when string values are being passed around in the script code. However, this is most likely only a problem for scripts that perform a lot of string operations.<p>
- Register the type with <code>RegisterStdString(asIScriptEngine*)</code>.<p>
- <dl class="see" compact><dt><b>See also:</b></dt><dd><a class="el" href="doc_addon_string.html">string object (reference counted)</a></dd></dl>
- <h2><a class="anchor" name="doc_addon_std_string_1">
- Public C++ interface</a></h2>
- Refer to the <code>std::string</code> implementation for your compiler.<h2><a class="anchor" name="doc_addon_std_string_2">
- Public script interface</a></h2>
- <pre>
- class string
- {
- // Constructors
- string();</pre><p>
- <pre> // Returns the length of the string
- uint length() const;</pre><p>
- <pre> // Assignment and concatenation
- string &opAssign(const string &in other);
- string &opAddAssign(const string &in other);
- string opAdd(const string &in right) const;</pre><p>
- <pre> // Access individual characters
- // uint8 &operator [] (uint)
- // const uint8 &operator [] (uint) const</pre><p>
- <pre> // Comparison operators
- bool opEquals(const string &in right) const;
- int opCmp(const string &in right) const;</pre><p>
- <pre> // Automatic conversion from number types to string type
- string &opAssign(double val);
- string &opAddAssign(double val);
- string opAdd(double val) const;
- string opAdd_r(double val) const;</pre><p>
- <pre> string &opAssign(int val);
- string &opAddAssign(int val);
- string opAdd(int val) const;
- string opAdd_r(int val) const;</pre><p>
- <pre> string &opAssign(uint val);
- string &opAddAssign(uint val);
- string opAdd(uint val) const;
- string opAdd_r(uint val) const;
- }
- </pre> </div>
- <hr size="1"><address style="text-align: right;"><small>Generated on Wed Dec 16 19:34:50 2009 for AngelScript by
- <a href="http://www.doxygen.org/index.html">
- <img src="doxygen.png" alt="doxygen" align="middle" border="0"></a> 1.5.9 </small></address>
- </body>
- </html>