📄 classpstring.html
字号:
</tr> </table> </td> </tr></table><table cellspacing=5 cellpadding=0 border=0> <tr> <td> </td> <td><p>Create a new reference to the specified string. The string memory is not copied, only the pointer to the data. <dl compact><dt><b>Parameters: </b></dt><dd><table border=0 cellspacing=2 cellpadding=0><tr><td valign=top><em>str</em> </td><td>String to create new reference to. </td></tr></table></dl> </td> </tr></table><a name="z231_3" doxytag="PString::PString"></a><p><table width="100%" cellpadding="2" cellspacing="0" border="0"> <tr> <td class="md"> <table cellpadding="0" cellspacing="0" border="0"> <tr> <td class="md" nowrap valign="top"> PINLINE PString::PString </td> <td class="md" valign="top">( </td> <td class="md" nowrap valign="top">const std::string & </td> <td class="mdname1" valign="top" nowrap> <em>str</em> </td> <td class="md" valign="top">) </td> <td class="md" nowrap></td> </tr> </table> </td> </tr></table><table cellspacing=5 cellpadding=0 border=0> <tr> <td> </td> <td><p>Create a new string from the specified std::string </td> </tr></table><a name="z231_4" doxytag="PString::PString"></a><p><table width="100%" cellpadding="2" cellspacing="0" border="0"> <tr> <td class="md"> <table cellpadding="0" cellspacing="0" border="0"> <tr> <td class="md" nowrap valign="top"> PString::PString </td> <td class="md" valign="top">( </td> <td class="md" nowrap valign="top">const char * </td> <td class="mdname1" valign="top" nowrap> <em>cstr</em> </td> <td class="md" valign="top">) </td> <td class="md" nowrap></td> </tr> </table> </td> </tr></table><table cellspacing=5 cellpadding=0 border=0> <tr> <td> </td> <td><p>Create a string from the C string array. This is most commonly used with a literal string, eg "hello". A new memory block is allocated of a size sufficient to take the length of the string and its terminating '\0' character.<p>If UCS-2 is used then each char from the char pointer is mapped to a single UCS-2 character. <dl compact><dt><b>Parameters: </b></dt><dd><table border=0 cellspacing=2 cellpadding=0><tr><td valign=top><em>cstr</em> </td><td>Standard '0' terminated C string. </td></tr></table></dl> </td> </tr></table><a name="z231_5" doxytag="PString::PString"></a><p><table width="100%" cellpadding="2" cellspacing="0" border="0"> <tr> <td class="md"> <table cellpadding="0" cellspacing="0" border="0"> <tr> <td class="md" nowrap valign="top"> PString::PString </td> <td class="md" valign="top">( </td> <td class="md" nowrap valign="top">const WORD * </td> <td class="mdname1" valign="top" nowrap> <em>ustr</em> </td> <td class="md" valign="top">) </td> <td class="md" nowrap></td> </tr> </table> </td> </tr></table><table cellspacing=5 cellpadding=0 border=0> <tr> <td> </td> <td><p>Create a string from the UCS-2 string array. A new memory block is allocated of a size sufficient to take the length of the string and its terminating '\0' character. <dl compact><dt><b>Parameters: </b></dt><dd><table border=0 cellspacing=2 cellpadding=0><tr><td valign=top><em>ustr</em> </td><td>UCS-2 null terminated string. </td></tr></table></dl> </td> </tr></table><a name="z231_6" doxytag="PString::PString"></a><p><table width="100%" cellpadding="2" cellspacing="0" border="0"> <tr> <td class="md"> <table cellpadding="0" cellspacing="0" border="0"> <tr> <td class="md" nowrap valign="top"> PString::PString </td> <td class="md" valign="top">( </td> <td class="md" nowrap valign="top">const char * </td> <td class="mdname" nowrap> <em>cstr</em>, </td> </tr> <tr> <td></td> <td></td> <td class="md" nowrap>PINDEX </td> <td class="mdname" nowrap> <em>len</em></td> </tr> <tr> <td></td> <td class="md">) </td> <td class="md" colspan="2"></td> </tr> </table> </td> </tr></table><table cellspacing=5 cellpadding=0 border=0> <tr> <td> </td> <td><p>Create a string from the array. A new memory block is allocated of a size equal to len# plus one which is sufficient to take the string and a terminating '\0' character.<p>If UCS-2 is used then each char from the char pointer is mapped to a single UCS-2 character.<p>Note that this function will allow a string with embedded '\0' characters to be created, but most of the functions here will be unable to access characters beyond the first '\0'. Furthermore, if the <a class="el" href="classPString.html#z237_0">MakeMinimumSize()</a># function is called, all data beyond that first #'\0'# character will be lost. <dl compact><dt><b>Parameters: </b></dt><dd><table border=0 cellspacing=2 cellpadding=0><tr><td valign=top><em>len</em> </td><td>Pointer to a string of characters. Length of the string in bytes. </td></tr></table></dl> </td> </tr></table><a name="z231_7" doxytag="PString::PString"></a><p><table width="100%" cellpadding="2" cellspacing="0" border="0"> <tr> <td class="md"> <table cellpadding="0" cellspacing="0" border="0"> <tr> <td class="md" nowrap valign="top"> PString::PString </td> <td class="md" valign="top">( </td> <td class="md" nowrap valign="top">const WORD * </td> <td class="mdname" nowrap> <em>ustr</em>, </td> </tr> <tr> <td></td> <td></td> <td class="md" nowrap>PINDEX </td> <td class="mdname" nowrap> <em>len</em></td> </tr> <tr> <td></td> <td class="md">) </td> <td class="md" colspan="2"></td> </tr> </table> </td> </tr></table><table cellspacing=5 cellpadding=0 border=0> <tr> <td> </td> <td><p>Create a string from the UCS-2 array. A new memory block is allocated of a size equal to len# plus one which is sufficient to take the string and a terminating '\0' character.<p>Note that this function will allow a string with embedded '\0' characters to be created, but most of the functions here will be unable to access characters beyond the first '\0'. Furthermore, if the <a class="el" href="classPString.html#z237_0">MakeMinimumSize()</a># function is called, all data beyond that first #'\0'# character will be lost. <dl compact><dt><b>Parameters: </b></dt><dd><table border=0 cellspacing=2 cellpadding=0><tr><td valign=top><em>len</em> </td><td>Pointer to a string of UCS-2 characters. Length of the string in bytes. </td></tr></table></dl> </td> </tr></table><a name="z231_8" doxytag="PString::PString"></a><p><table width="100%" cellpadding="2" cellspacing="0" border="0"> <tr> <td class="md"> <table cellpadding="0" cellspacing="0" border="0"> <tr> <td class="md" nowrap valign="top"> PString::PString </td> <td class="md" valign="top">( </td> <td class="md" nowrap valign="top">const <a class="el" href="classPWORDArray.html">PWORDArray</a> & </td> <td class="mdname1" valign="top" nowrap> <em>ustr</em> </td> <td class="md" valign="top">) </td> <td class="md" nowrap></td> </tr> </table> </td> </tr></table><table cellspacing=5 cellpadding=0 border=0> <tr> <td> </td> <td><p>Create a string from the UCS-2 array. A new memory block is allocated of a size equal to len# plus one which is sufficient to take the string and a terminating '\0' character.<p>Note that this function will allow a string with embedded '\0' characters to be created, but most of the functions here will be unable to access characters beyond the first '\0'. Furthermore, if the <a class="el" href="classPString.html#z237_0">MakeMinimumSize()</a># function is called, all data beyond that first #'\0'# character will be lost. <dl compact><dt><b>Parameters: </b></dt><dd><table border=0 cellspacing=2 cellpadding=0><tr><td valign=top><em>ustr</em> </td><td>UCS-2 null terminated string. </td></tr></table></dl> </td> </tr></table><a name="z231_9" doxytag="PString::PString"></a><p><table width="100%" cellpadding="2" cellspacing="0" border="0"> <tr> <td class="md"> <table cellpadding="0" cellspacing="0" border="0"> <tr> <td class="md" nowrap valign="top"> PINLINE PString::PString </td> <td class="md" valign="top">( </td> <td class="md" nowrap valign="top">char </td> <td class="mdname1" valign="top" nowrap> <em>ch</em> </td> <td class="md" valign="top">) </td> <td class="md" nowrap></td> </tr> </table> </td> </tr></table><table cellspacing=5 cellpadding=0 border=0> <tr> <td>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -