substr_compare
Binary Safe နှိုင်းယှဉ်မှု string ကို (သတ်မှတ်ထားသောအရှည်ကို offset အနေအထားနှင့်နှိုင်းယှဉ်ပါ)
substr_compare()
function ကို) function နှစ်ခု strings နှစ်ခု string နှစ်ခုနှင့်နှိုင်းယှဉ်။
ထိပ်ဖ်ား: ဤလုပ်ဆောင်ချက်သည် binary safe and case ကို Sensitive ဖြစ်သည်။
ကြိုးနှစ်ချောင်းကိုနှိုင်းယှဉ်ပါ။
<? PHP echo substr_cappare ( "Hello World" , "Hello World" , 0 ) ; >
သင်ကိုယ်တိုင်စမ်းကြည့်ပါ
string1 ကိုနှိုင်းယှဉ်လျှင်စသည့် string နှစ်ခုကိုနှိုင်းယှဉ်ကြည့်ပါ။
<? PHP echo substr_cappare ( "Hello World" , "World" , 6 ) ; >
သင်ကိုယ်တိုင်စမ်းကြည့်ပါ
parameters အားလုံးကိုသုံးပါ။
<? PHP Echo Substr_ClayChare ( "World" , "သို့မဟုတ်" , 1 , 2 ) ; Echo Substr_ClayChare ( "World" , "LD" , - 2 , 2 ) , echo substr_cappare ( "လောက" , "orl" , 1 , 2 ) ; echo substr_cappare ( "World" , "သို့မဟုတ်" , 1 , 2 , စစ်မှန်သော ) ; echo substr_cappare ( "လောက" , "သို့မဟုတ်" , 1 , 3 ) ; Echo Substr_ClayChare ( "World" , "RL" , 1 , 2 ) ; >
သင်ကိုယ်တိုင်စမ်းကြည့်ပါ
ကွဲပြားခြားနားသောပြန်လာတန်ဖိုးများ:
<? PHP Echo Substr_Compare ( "Hello World!" , "Hello World!" , 0 ) ; // နှစ်ခု strings တန်းတူဖြစ်ကြသည် echo substr_cappare ( "Hello World!" , "ဟဲလို" , 0 ) ; // string1 string2 ထက်သာ။ ကြီးမြတ်သည် echo substr_cappare ( "Hello World!" , "Hello World! မင်္ဂလာပါ!" , 0 ) ; 0 ) ; // string1 string2 ထက်နည်းသည် >
သင်ကိုယ်တိုင်စမ်းကြည့်ပါ
substr_cappare ( string1 , string2 , startpos , အရှည် , အမှု )
တေးရေး | ဖေါ်ပြ |
---|---|
string1 | လိုအပ်ပါတယ် နှိုင်းယှဉ်ခံရဖို့ပထမ ဦး ဆုံး string ကိုဖေါ်ပြသည်။ |
string2 | လိုအပ်ပါတယ် နှိုင်းယှဉ်ခံရဖို့ဒုတိယ string ကိုဖေါ်ပြသည်။ |
StartPos | လိုအပ်ပါတယ် string1 ကိုနှိုင်းယှဉ်စတင်ရန်ဘယ်မှာသတ်မှတ်သည်။ အကယ်. ၎င်းသည်အနှုတ်လက်ခဏာနံပါတ်ဖြစ်ပါက string ၏အဆုံးမှစတင်သည်။ |
အရှည် | optional ကို။ string1 တွင်စာလုံးမည်မျှရှိသည်ကိုသတ်မှတ်သည် (ဇာတ်ကောင်အရေအတွက်) ။ |
သတ်တော |
optional ကို။ ဖြစ်ရပ်မှန်အာရုံခံနိုင်မှုကိုလုပ်ဆောင်ရန်ရှိမရှိကိုဘော့လိုလိုတန်ဖိုး -
|