လက်ရှိတည်နေရာ: ပင်မစာမျက်နှာ> ဖန်ရှင်အမျိုးအစားများ> mb_stripos

mb_stripos

အမှုတစ်ခု string ကိုအခြား string ကိုပထမ ဦး ဆုံးပေါ်လာဘယ်မှာအမှုတွေ့ကြုံ
အမည်:mb_stripos
အမျိုးအစား:Multi-byte string ကို
programming language:php
တစ်ကြောင်းဖြင့်အကျဉ်းချုပ်:string တစ်ခုတွင်အခြား string တစ်ခု (ကိစ္စတွင်အာရုံမခံစားနိုင်သော) တွင်ရှာပါ။

function name: mb_stropos ()

သက်ဆိုင်သောဗားရှင်း: PHP 4> = 4.2.0, PHP 5, PHP 7

function ကိုဖော်ပြချက် - MB_Stripos () function သည်အခြား string တစ်ခု (ကိစ္စတွင်မခံစားနိုင်သော) ကိုရှာဖွေသည်။ stripsipos () function ကိုဆင်တူသော်လည်း MB_Stripos () MB_Stripos () Multibyte စာလုံးများကိုထောက်ပံ့သည်။

Syntax: MB_Stropos (string $ haystack, string $ အပ်ခြင်း, INT $ Offset = 0, string ကို $ encoding = mb_internal_encoding = int | falty

Parametermer

  • $ haystack: အလွှာတစ်ခုရှာဖွေရန်အတွက် string ကို။
  • $ အပ် - တွေ့ရှိရမည့်အလွှာ။
  • $ offset (optional ကို): string ကို၏သတ်မှတ်ထားသောတည်နေရာကိုကြည့်ရှုစတင်သည်။
  • $ encoding (optional ကို): အက်ခရာ encoding: internal character encoding မှ default ကိုဖော်ပြပါ။

Value ကိုပြန်သွားပါ

  • အကယ်. အလွှာတစ်ခုကိုတွေ့ရှိပါက၎င်းသည် string ကို string (0 င်မှ စ. အညွှန်းကိန်း) တွင်တည်ရှိသည်။
  • အဘယ်သူမျှမအလွှာကိုရှာတွေ့ပါကမှားယွင်းစွာပြန်လာသည်။

ဥပမာ -

 $haystack = "Hello, World!"; $needle = "world"; $position = mb_stripos($haystack, $needle); if ($position !== false) { echo "找到子字符串,位置为:" . $position; } else { echo "未找到子字符串"; }

ထုတ်လုပ်မှု -

找到子字符串,位置为:7

မှတ်စုများ

  • MB_Stripos () function သည်ကိစ္စတွင်မခံစားနိုင်ပါ။ အကယ်. သင်သည်အမှုအသတ်အထိခိုက်မခံသောရှာဖွေမှုတစ်ခုလိုအပ်ပါက MB_Stripos () function ကိုသုံးပါ။
  • အကယ်. သတ်မှတ်ထားသော string encoding သည်မမှန်ကန်ပါကသတိပေးချက်တစ်ခုချလိမ့်မည်။
သက်ဆိုင်သောဖင်ခှ်ရှင်းများ
  • http output ကိုအက်ခရာ encoding set / get mb_http_output

    mb_http_output

    httpoutputကိုအက်ခရာe
  • အခြား string တစ်ခုအတွက် string တစ်ခု၏ပထမ ဦး ဆုံးဖြစ်ပျက်မှုကိုအမှုအသေး mb_stristr

    mb_stristr

    အခြားstringတစ်ခုအတွက
  • လက်ရှိဘာသာစကားကိုသတ်မှတ်ပါ mb_language

    mb_language

    လက်ရှိဘာသာစကားကိုသတ်
  • string ကိုစာလုံးအကြီးတင်ပါ mb_strtoupper

    mb_strtoupper

    stringကိုစာလုံးအကြီး
  • လူသိများ encoding အမျိုးအစားများအတွက် alias ကိုရယူပါ mb_encoding_aliases

    mb_encoding_aliases

    လူသိများencodingအမျိ
  • လာမယ့်ပုံမှန်စကားရပ်ကိုက်ညီမှု၏အစမှတ်ပြန်သွား mb_ereg_search_getpos

    mb_ereg_search_getpos

    လာမယ့်ပုံမှန်စကားရပ်
  • တစ်ခုသို့မဟုတ်တစ်ခုထက်ပိုသော variable တွေကို၏ဇာတ်ကောင် encoding ပြောင်း mb_convert_variables

    mb_convert_variables

    တစ်ခုသို့မဟုတ်တစ်ခုထ
  • အမှုကအခြား string တစ်ခုအတွက်သတ်မှတ်ထားသောဇာတ်ကောင်၏နောက်ဆုံးဖြစ်ပျက်မှုများကိုရှာဖွေနေသည် mb_strrichr

    mb_strrichr

    အမှုကအခြားstringတစ်ခ
လူကြိုက်များသော ဆောင်းပါးများ