⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 mf_strpos.hlp

📁 是一个经济学管理应用软件 很难找的 但是经济学学生又必须用到
💻 HLP
字号:
{smcl}
{* 16mar2005}{...}
{cmd:help mata strpos()}
{hline}
{* index strpos()}{...}

{title:Title}

{p 4 4 2}
{bf:[M-5] strpos() -- Find substring in string}


{title:Syntax}

{p 8 12 2}
{it:real matrix}
{cmd:strpos(}{it:string matrix haystack}{cmd:,}
{it:string matrix needle}{cmd:)}


{title:Description}

{p 4 4 2}
{cmd:strpos(}{it:haystack}{cmd:,} {it:needle}{cmd:)} returns the location of
the first occurrence of {it:needle} in {it:haystack}, or 0 if {it:needle} does
not occur.

{p 4 4 2}
When arguments are not scalar, {cmd:strpos()} returns element-by-element
results.


{title:Remarks}

{p 4 4 2}
When working with binary strings, one can find the location of 
the binary 0 using {cmd:strpos(}{it:s}{cmd:, char(0))}.


{title:Conformability}

    {cmd:strpos(}{it:haystack}{cmd:,} {it:needle}{cmd:)}:
        {it:haystack}:  {it:r1 x c1}
          {it:needle}:  {it:r2 x c2}, {it:haystack} and {it:needle} r-conformable
          {it:result}:  max({it:r1},{it:r2}) {it:x} max({it:c1},{it:c2})


{title:Diagnostics}

{p 4 4 2}
{cmd:strpos(}{it:haystack}{cmd:,} {it:needle}{cmd:)} returns 0 if {it:needle}
is not found in {it:haystack}.


{title:Source code}

{p 4 4 2}
Function is built-in.


{title:Also see}

{p 4 13 2}
Manual:  {hi:[M-5] strpos()}

{p 4 13 2}
Online:  help for 
{bf:{help m4_string:[M-4] string}}
{p_end}

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -