6 Star 9 Fork 3

PureBasic/PureBasicPreference

加入 Gitee
与超过 1400万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
克隆/下载
stringbytelength.html 2.28 KB
一键复制 编辑 原始数据 按行查看 历史
麦壳饼 提交于 2016-08-10 10:51 +08:00 . 加入文件
<html><head><title>StringByteLength</title></head>
<body bgcolor="#EFF1F0" link="#3A3966" vlink="#000000" alink="#000000">
<font face="Verdana, sans-serif" size="2"><p align="center"><b><font size="4">StringByteLength()</font></b></p>
<p><b>Syntax</b></p><blockquote>
Result = <font color="#3A3966"><b>StringByteLength</b></font>(String$ [, Format])</blockquote>
</blockquote>
<b>Description</b><br><blockquote>
Returns the number of bytes required to store the string in memory in a given format.
</blockquote><p><b>Parameters</b></p><blockquote>
<style type="text/css">
table.parameters { border-spacing: 0px; border-style: none; border-collapse: collapse; }
table.parameters td { border-width: 1px; padding: 6px; border-style: solid; border-color: gray; vertical-align: top; font-family:Arial; font-size:10pt; }
</style>
<table width="90%" class="parameters">
<tr><td width="10%"><i>String$</i></td>
<td width="90%">
The string to use.
</td></tr>
<tr><td><i>Format (optional)</i></td>
<td>
The destination format to use. It can be one of the following value:
<pre><font face="Courier New, Courier, mono"size="2"> <font color="#924B72">#PB_Ascii</font> : Ascii format
<font color="#924B72">#PB_UTF8</font> : UTF8 format
<font color="#924B72">#PB_Unicode</font>: UTF16 format
</font></pre>
If omitted, the mode of the executable (<a href="../reference/unicode.html">unicode</a> or ascii) is used.
</td></tr>
</table>
</blockquote><p><b>Return value</b></p><blockquote>
The number of bytes required to store the string in memory in a given format.
</blockquote><p><b>Remarks</b></p><blockquote>
The number of bytes returned does not include the terminating Null-Character of the string.
The size of the Null-Character is 1 byte for Ascii and UTF8 mode and 2 bytes for Unicode mode.
</blockquote><p><b>Example</b></p><blockquote>
<pre><font face="Courier New, Courier, mono"size="2"> <b><font color="#3A3966">Debug</font></b> <font color="#3A3966">StringByteLength</font>(&quot;?quot;, <font color="#924B72">#PB_UTF8</font>) <font color="#3A3966">; will display 2</font>
</font></pre>
</Blockquote><p><b>Supported OS </b><Blockquote>All</Blockquote></p><center><- <a href=stru.html>StrU()</a> - <a href="index.html">String Index</a> - <a href="stringfield.html">StringField()</a> -><br><br>
</body></html>
Loading...
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
HTML/CSS
1
https://gitee.com/PureBasic/PureBasicPreference.git
git@gitee.com:PureBasic/PureBasicPreference.git
PureBasic
PureBasicPreference
PureBasicPreference
master

搜索帮助