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

strchr

strstr ၏ alias ကို
အမည်:strchr
အမျိုးအစား:ကြိုး
programming language:php
တစ်ကြောင်းဖြင့်အကျဉ်းချုပ်:အခြား string တစ်ခုအတွက် string ကို၏ပထမ ဦး ဆုံးဖြစ်ပျက်မှုကိုရှာပါ။ (strstrion များအတွက် alias) ။ )

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

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

ဒီ function ဟာ strstr() function ကိုအတွက် alias ကိုဖြစ်ပါတယ်။

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

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

နမူနာ

ဥပမာ 1

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

 <? PHP
Echo strchr ( "Hello World!" , "World" ) ,
>

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

ဥပမာ 2

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

 <? PHP
ECHO strchr ( "Hello World!" , 111 ) ;
>

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

ဥပမာ 3

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

 <? PHP
echo strchr ( "Hello World!" , "World" , True ) ,
>

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

သဒ္ဒါ

 strchr ( string , search , option_search ) ;
တေးရေး ဖေါ်ပြ
ကြိုး လိုအပ်ပါတယ် ရှာဖွေလျက်ရှိသော string ကိုဖေါ်ပြသည်။
ရှာဖေှခြင်း

လိုအပ်ပါတယ် ရှာဖွေရေး string ကိုဖေါ်ပြသည်။

အကယ်. parameter သည်နံပါတ်တစ်ခုဆိုပါကနံပါတ်နှင့်သက်ဆိုင်သော ASCII တန်ဖိုးနှင့်ကိုက်ညီသောစာလုံးများကိုရှာဖွေပါ။

_search

optional ကို။ ပုံမှန်တန်ဖိုးသည် "မှားယွင်းသော" ၏ boolean တန်ဖိုးဖြစ်သည်။

အကယ်. "True" ကိုသတ်မှတ်ပါက ရှာဖွေမှု parameter သည်ပထမ ဦး ဆုံးပေါ်လာသည်။

သက်ဆိုင်သောဖင်ခှ်ရှင်းများ
  • string ကို encode လုပ်ဖို့ uuencode ကိုသုံးပါ convert_uuencode

    convert_uuencode

    stringကိုencodeလုပ်ဖ
  • ငွေကြေး strings သို့နံပါတ်များကို format လုပ်ပါ money_format

    money_format

    ငွေကြေးstringsသို့နံ
  • တစ် ဦး string ကိုအပေါ်တစ် ဦး ပုပ် 1 နှစ်ပြောင်းလဲလုပ်ဆောင်ပါ str_rot13

    str_rot13

    တစ်ဦးstringကိုအပေါ်တ
  • နံပါတ်များမှ single-byte ကြိုးများကိုထုတ်လုပ်ပါ chr

    chr

    နံပါတ်များမှsingle-b
  • HTML အဖွဲ့အစည်းများအားသက်ဆိုင်ရာဇာတ်ကောင်များသို့ပြောင်းပါ html_entity_decode

    html_entity_decode

    HTMLအဖွဲ့အစည်းများအာ
  • ကြိုး၏ soundex key ကိုတွက်ချက်ပါ soundex

    soundex

    ကြိုး၏soundexkeyကိုတ
  • Binary Data ကို hexadecimal ကိုယ်စားပြုမှုသို့ပြောင်းပါ bin2hex

    bin2hex

    BinaryDataကိုhexadec
  • output ကိုတစ်ခုသို့မဟုတ်တစ်ခုထက်ပိုသောကြိုးများ echo

    echo

    outputကိုတစ်ခုသို့မဟ
လူကြိုက်များသော ဆောင်းပါးများ