📄 cpl__string_8h.html
字号:
Unescape a string.<p>This function does the opposite of <a class="el" href="cpl__string_8h.html#df2c0e5051d8f5c7fc742e4be41e935a">CPLEscapeString()</a>. Given a string with special values escaped according to some scheme, it will return a new copy of the string returned to it's original form.<p><dl compact><dt><b>Parameters:</b></dt><dd> <table border="0" cellspacing="2" cellpadding="0"> <tr><td valign="top"></td><td valign="top"><em>pszInput</em> </td><td>the input string. This is a zero terminated string. </td></tr> <tr><td valign="top"></td><td valign="top"><em>pnLength</em> </td><td>location to return the length of the unescaped string, which may in some cases include embedded '' characters. </td></tr> <tr><td valign="top"></td><td valign="top"><em>nScheme</em> </td><td>the escaped scheme to undo (see <a class="el" href="cpl__string_8h.html#df2c0e5051d8f5c7fc742e4be41e935a">CPLEscapeString()</a> for a list).</td></tr> </table></dl><dl class="return" compact><dt><b>Returns:</b></dt><dd>a copy of the unescaped string that should be freed by the application using CPLFree() when no longer needed. </dd></dl></div></div><p><a class="anchor" name="d2766cf9f275a413c46ac4f7fa749be7"></a><!-- doxytag: member="cpl_string.h::CSLMerge" ref="d2766cf9f275a413c46ac4f7fa749be7" args="(char **papszOrig, char **papszOverride)" --><div class="memitem"><div class="memproto"> <table class="memname"> <tr> <td class="memname">char** CSLMerge </td> <td>(</td> <td class="paramtype">char ** </td> <td class="paramname"> <em>papszOrig</em>, </td> </tr> <tr> <td class="paramkey"></td> <td></td> <td class="paramtype">char ** </td> <td class="paramname"> <em>papszOverride</em></td><td> </td> </tr> <tr> <td></td> <td>)</td> <td></td><td></td><td width="100%"></td> </tr> </table></div><div class="memdoc"><p>Merge two lists. <p>The two lists are merged, ensuring that if any keys appear in both that the value from the second (papszOverride) list take precidence.<p><dl compact><dt><b>Parameters:</b></dt><dd> <table border="0" cellspacing="2" cellpadding="0"> <tr><td valign="top"></td><td valign="top"><em>papszOrig</em> </td><td>the original list, being modified. </td></tr> <tr><td valign="top"></td><td valign="top"><em>papszOverride</em> </td><td>the list of items being merged in. This list is unaltered and remains owned by the caller.</td></tr> </table></dl><dl class="return" compact><dt><b>Returns:</b></dt><dd>updated list. </dd></dl></div></div><p><a class="anchor" name="8dbce00a6e7fa4710613e3e4c963dd5d"></a><!-- doxytag: member="cpl_string.h::CSLSetNameValue" ref="8dbce00a6e7fa4710613e3e4c963dd5d" args="(char **papszStrList, const char *pszName, const char *pszValue)" --><div class="memitem"><div class="memproto"> <table class="memname"> <tr> <td class="memname">char** CSLSetNameValue </td> <td>(</td> <td class="paramtype">char ** </td> <td class="paramname"> <em>papszList</em>, </td> </tr> <tr> <td class="paramkey"></td> <td></td> <td class="paramtype">const char * </td> <td class="paramname"> <em>pszName</em>, </td> </tr> <tr> <td class="paramkey"></td> <td></td> <td class="paramtype">const char * </td> <td class="paramname"> <em>pszValue</em></td><td> </td> </tr> <tr> <td></td> <td>)</td> <td></td><td></td><td width="100%"></td> </tr> </table></div><div class="memdoc"><p>Assign value to name in StringList.<p>Set the value for a given name in a StringList of "Name=Value" pairs ("Name:Value" pairs are also supported for backward compatibility with older stuff.)<p>If there is already a value for that name in the list then the value is changed, otherwise a new "Name=Value" pair is added.<p><dl compact><dt><b>Parameters:</b></dt><dd> <table border="0" cellspacing="2" cellpadding="0"> <tr><td valign="top"></td><td valign="top"><em>papszList</em> </td><td>the original list, the modified version is returned. </td></tr> <tr><td valign="top"></td><td valign="top"><em>pszName</em> </td><td>the name to be assigned a value. This should be a well formed token (no spaces or very special characters). </td></tr> <tr><td valign="top"></td><td valign="top"><em>pszValue</em> </td><td>the value to assign to the name. This should not contain any newlines (CR or LF) but is otherwise pretty much unconstrained. If NULL any corresponding value will be removed.</td></tr> </table></dl><dl class="return" compact><dt><b>Returns:</b></dt><dd>modified stringlist. </dd></dl></div></div><p><a class="anchor" name="97b38f55a35f3c1d66ba343692ab9ec0"></a><!-- doxytag: member="cpl_string.h::CSLSetNameValueSeparator" ref="97b38f55a35f3c1d66ba343692ab9ec0" args="(char **papszStrList, const char *pszSeparator)" --><div class="memitem"><div class="memproto"> <table class="memname"> <tr> <td class="memname">void CSLSetNameValueSeparator </td> <td>(</td> <td class="paramtype">char ** </td> <td class="paramname"> <em>papszList</em>, </td> </tr> <tr> <td class="paramkey"></td> <td></td> <td class="paramtype">const char * </td> <td class="paramname"> <em>pszSeparator</em></td><td> </td> </tr> <tr> <td></td> <td>)</td> <td></td><td></td><td width="100%"></td> </tr> </table></div><div class="memdoc"><p>Replace the default separator (":" or "=") with the passed separator in the given name/value list.<p>Note that if a separator other than ":" or "=" is used, the resulting list will not be manipulatable by the CSL name/value functions any more.<p>The <a class="el" href="cpl__string_8h.html#40ff577b83aca84a603414183e6903d3">CPLParseNameValue()</a> function is used to break the existing lines, and it also strips white space from around the existing delimiter, thus the old separator, and any white space will be replaced by the new separator. For formatting purposes it may be desireable to include some white space in the new separator. eg. ": " or " = ".<p><dl compact><dt><b>Parameters:</b></dt><dd> <table border="0" cellspacing="2" cellpadding="0"> <tr><td valign="top"></td><td valign="top"><em>papszList</em> </td><td>the list to update. Component strings may be freed but the list array will remain at the same location.</td></tr> <tr><td valign="top"></td><td valign="top"><em>pszSeparator</em> </td><td>the new separator string to insert. </td></tr> </table></dl></div></div><p><a class="anchor" name="da798bb0fafd08c7908d0f3716f341b3"></a><!-- doxytag: member="cpl_string.h::CSLTestBoolean" ref="da798bb0fafd08c7908d0f3716f341b3" args="(const char *pszValue)" --><div class="memitem"><div class="memproto"> <table class="memname"> <tr> <td class="memname">int CSLTestBoolean </td> <td>(</td> <td class="paramtype">const char * </td> <td class="paramname"> <em>pszValue</em> </td> <td> ) </td> <td width="100%"></td> </tr> </table></div><div class="memdoc"><p>Test what boolean value contained in the string.<p>If pszValue is "NO", "FALSE", "OFF" or "0" will be returned FALSE. Otherwise, TRUE will be returned.<p><dl compact><dt><b>Parameters:</b></dt><dd> <table border="0" cellspacing="2" cellpadding="0"> <tr><td valign="top"></td><td valign="top"><em>pszValue</em> </td><td>the string should be tested.</td></tr> </table></dl><dl class="return" compact><dt><b>Returns:</b></dt><dd>TRUE or FALSE. </dd></dl></div></div><p><hr>Generated for GDAL by <a href="http://www.doxygen.org/index.html"><img src="doxygen.png" alt="doxygen" align="middle" border="0"></a> 1.5.1.</body></html>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -