1
0
mirror of https://github.com/php/doc-ja.git synced 2026-03-27 00:22:08 +01:00
Files
archived-doc-ja/reference/strings/functions/strlen.xml
Yoshinari Takaoka 73ccac34bf Remove PHP4 or PHP5 only extension, changelogs
git-svn-id: https://svn.php.net/repository/phpdoc/ja/trunk@350668 c90b9560-bf6c-de11-be94-00142212c4b1
2020-09-27 01:47:22 +00:00

117 lines
2.8 KiB
XML

<?xml version="1.0" encoding="utf-8"?>
<!-- $Revision$ -->
<!-- EN-Revision: 7f569e1f175adf1fbd0e462eba8d6bc82214c939 Maintainer: hirokawa Status: ready -->
<!-- Credits: mumumu -->
<refentry xmlns="http://docbook.org/ns/docbook" xml:id="function.strlen">
<refnamediv>
<refname>strlen</refname>
<refpurpose>文字列の長さを得る</refpurpose>
</refnamediv>
<refsect1 role="description">
&reftitle.description;
<methodsynopsis>
<type>int</type><methodname>strlen</methodname>
<methodparam><type>string</type><parameter>string</parameter></methodparam>
</methodsynopsis>
<para>
与えられた <parameter>string</parameter> の長さを返します。
</para>
</refsect1>
<refsect1 role="parameters">
&reftitle.parameters;
<para>
<variablelist>
<varlistentry>
<term><parameter>string</parameter></term>
<listitem>
<para>
長さを調べる文字列。
</para>
</listitem>
</varlistentry>
</variablelist>
</para>
</refsect1>
<refsect1 role="returnvalues">
&reftitle.returnvalues;
<para>
成功した場合に <parameter>string</parameter> の長さ、
<parameter>string</parameter> が空の文字列だった場合に
<literal>0</literal> を返します。
</para>
</refsect1>
<refsect1 role="examples">
&reftitle.examples;
<para>
<example>
<title><function>strlen</function> の例</title>
<programlisting role="php">
<![CDATA[
<?php
$str = 'abcdef';
echo strlen($str); // 6
$str = ' ab cd ';
echo strlen($str); // 7
?>
]]>
</programlisting>
</example>
</para>
</refsect1>
<refsect1 role="notes">
&reftitle.notes;
<note>
<para>
<function>strlen</function> が返すのはバイト数であり、
文字数ではありません。
</para>
</note>
<note>
<para>
配列に対して <function>strlen</function> を実行すると &null; を返し、
<constant>E_WARNING</constant> レベルのエラーが発生します。
</para>
</note>
</refsect1>
<refsect1 role="seealso">
&reftitle.seealso;
<para>
<simplelist>
<member><function>count</function></member>
<member><function>grapheme_strlen</function></member>
<member><function>iconv_strlen</function></member>
<member><function>mb_strlen</function></member>
</simplelist>
</para>
</refsect1>
</refentry>
<!-- Keep this comment at the end of the file
Local variables:
mode: sgml
sgml-omittag:t
sgml-shorttag:t
sgml-minimize-attributes:nil
sgml-always-quote-attributes:t
sgml-indent-step:1
sgml-indent-data:t
indent-tabs-mode:nil
sgml-parent-document:nil
sgml-default-dtd-file:"~/.phpdoc/manual.ced"
sgml-exposed-tags:nil
sgml-local-catalogs:nil
sgml-local-ecat-files:nil
End:
vim600: syn=xml fen fdm=syntax fdl=2 si
vim: et tw=78 syn=sgml
vi: ts=1 sw=1
-->