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

stristr

ဖြစ်ရပ် - အာရုံမခံစားနိုင် strstr
အမည်:stristr
အမျိုးအစား:ကြိုး
programming language:php
တစ်ကြောင်းဖြင့်အကျဉ်းချုပ်:String ကိုအခြား string တစ်ခုတွင်မည်သည့်နေရာတွင်တွေ့နိုင်သည် (ကိစ္စတွင်မခံစားနိုင်သော)

အဓိပ္ပါယ်နှင့်အသုံးပြုမှု

stristr() function ကိုအခြား string တစ်ခု၏ပထမ ဦး ဆုံးဖြစ်ပျက်မှုအတွက်ရှာဖွေခြင်း။

မှတ်ချက် - ဒီ function က binary ဘေးကင်းလုံခြုံသည်။

မှတ်ချက် - ဒီ function ကကိစ္စနဲ့မခံစားနိုင်တဲ့ကိစ္စပါ။ ဖြစ်ရပ်မှန်အထိခိုက်မခံသောရှာဖွေမှုများအတွက် strstr() function ကိုသုံးပါ။

နမူနာ

ဥပမာ 1

"Hello World" တွင် "World" ၏ပထမအကြိမ်ဖြစ်ပျက်မှုကိုရှာပါ။ ကြွင်းသော string ကိုပြန်ပို့လော့။

 <? PHP
Echo Strstred ( "Hello World!" , "World " ,
>

သင်ကိုယ်တိုင်စမ်းကြည့်ပါ

ဥပမာ 2

"o" ၏ ASCII တန်ဖိုးနှင့်အတူ string ကိုရှာဖွေပြီးကျန်ရှိသော string ကိုပြန်ပို့ပါ။

 <? PHP
ပဲ့တင်သံ strstred ( "Hello World!" , 111 ) ;
>

သင်ကိုယ်တိုင်စမ်းကြည့်ပါ

ဥပမာ 2

"World" ၏ပထမ ဦး ဆုံးဖြစ်ပျက်မှုမတိုင်မီ string ကိုအပိုင်းကိုပြန်သွား::

 <? PHP
Echo Strstred ( "Hello World!" , "World" , စစ်မှန်သော ) ;
>

သင်ကိုယ်တိုင်စမ်းကြည့်ပါ

သက်ဆိုင်သောဖင်ခှ်ရှင်းများ
  • ဖိုင်၏ sha1 hash တန်ဖိုးကိုတွက်ချက်ပါ sha1_file

    sha1_file

    ဖိုင်၏sha1hashတန်ဖို
  • အစားထိုး substring str_replace

    str_replace

    အစားထိုးsubstring
  • tag split string ကို strtok

    strtok

    tagsplitstringကို
  • သက်ဆိုင်သောအက္ခရာများအားလုံးကို HTML အဖွဲ့အစည်းများသို့ပြောင်းပါ htmlentities

    htmlentities

    သက်ဆိုင်သောအက္ခရာမျာ
  • strstr ၏ alias ကို strchr

    strchr

    strstr၏aliasကို
  • string ကို၏အစိတ်အပိုင်းတစ်ခုပြန်သွားပါ substr

    substr

    stringကို၏အစိတ်အပိုင
  • သဘာဝအစဉ်အဆက် algorithm ကို အသုံးပြု. ကြိုးများကိုနှိုင်းယှဉ်ခြင်း (ကိစ္စတွင်မခံစားနိုင်သော) strnatcasecmp

    strnatcasecmp

    သဘာဝအစဉ်အဆက်algorith
  • စာလုံးအသေးကိုပထမ ဦး ဆုံးဇာတ်ကောင်ကိုသတ်မှတ်ပါ lcfirst

    lcfirst

    စာလုံးအသေးကိုပထမဦးဆု