<?xml version="1.0" encoding="UTF-8"?>
+
<!--
* Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
* Copyright (C) INRIA -
* http://www.cecill.info/licences/Licence_CeCILL_V2.1-en.txt
*
-->
+
<refentry xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:svg="http://www.w3.org/2000/svg" xmlns:ns4="http://www.w3.org/1999/xhtml" xmlns:mml="http://www.w3.org/1998/Math/MathML" xmlns:db="http://docbook.org/ns/docbook" xmlns:scilab="http://www.scilab.org" xml:id="strspn" xml:lang="ja">
+
<refnamediv>
+
<refname>strspn</refname>
+
<refpurpose>文字列において指定した文字集合の幅を取得</refpurpose>
+
</refnamediv>
+
<refsynopsisdiv>
+
<title>呼び出し手順</title>
- <synopsis>res = strspn(str1,str2)</synopsis>
+
+ <synopsis>res = strspn(str1, str2)</synopsis>
+
</refsynopsisdiv>
+
<refsection>
- <title>パラメータ</title>
+
+ <title>引数</title>
+
<variablelist>
+
<varlistentry>
+
<term>str1</term>
+
<listitem>
+
<para>文字列または文字列の行列</para>
+
</listitem>
+
</varlistentry>
+
<varlistentry>
+
<term>str2</term>
+
<listitem>
+
<para>文字列または文字列の行列</para>
+
</listitem>
+
</varlistentry>
+
<varlistentry>
+
<term>res</term>
+
<listitem>
- <para>行列.</para>
+
+ <para>文字列の行列.</para>
+
</listitem>
+
</varlistentry>
+
</variablelist>
+
</refsection>
+
<refsection>
+
<title>説明</title>
+
<para>
- <literal>res = strspn(str1,str2)</literal> は,
- str2に含まれる文字のみからなる
- str1の先頭部分の長さを返します.
+
+ <code>res = strspn(str1, str2)</code>は,
+
+ <varname>str2</varname>に含まれる文字のみからなる
+
+ <varname>str1</varname>の先頭部分の長さを返します.
+
</para>
- <para>str1 はstr2と次元が同じで,もしくは,str1は文字列である必要があります. </para>
+
+ <para>
+
+ <varname>str1</varname>は<varname>str2</varname>と次元が同じ,
+
+ もしくは,
+
+ <varname>str2</varname>が1x1の文字列である必要があります.
+
+ どちらの場合でも,
+
+ 出力は<varname>str1</varname>と同じ次元となります.
+
+ </para>
+
</refsection>
+
<refsection>
+
<title>例</title>
+
<programlisting role="example"><![CDATA[
i = strspn("129th","1234567890");
mprintf ("The length of initial number is %d.\n",i);
i = strspn(["129th","130th"],["1234567890","130t"])
]]></programlisting>
+
</refsection>
+
<refsection role="see also">
+
<title>参照</title>
+
<simplelist type="inline">
+
<member>
+
<link linkend="strcspn">strcspn</link>
+
</member>
+
</simplelist>
+
</refsection>
+
</refentry>
+