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

chunk_split

သေးငယ်တဲ့တုံးသို့ string ကိုခွဲ
အမည်:chunk_split
အမျိုးအစား:ကြိုး
programming language:php
တစ်ကြောင်းဖြင့်အကျဉ်းချုပ်:သေးငယ်အစိတ်အပိုင်းများ၏စီးရီးသို့ string ကိုခွဲ။

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

အဆိုပါ chunk_split() function ကိုသေးငယ်တဲ့အစိတ်အပိုင်းများသို့ string ကိုကွဲပြားစေတယ်။

မှတ်ချက် - ဒီ function ကမူရင်း string ကိုမပြောင်းလဲပါဘူး။

နမူနာ

ဥပမာ 1

ဇာတ်ကောင်တစ် ဦး ချင်းစီပြီးနောက်တစ်ကြိမ် string ကိုတစ်ကြိမ်ခွဲပြီး "" add "။ " တစ်ခုချင်းစီကိုအစိတ်အပိုင်းပြီးနောက်:

 <? PHP
$ str = "ရှန်ဟိုင်း" ;
ပဲ့တင်သံ chunk_split ( $ str str , 1 , "။ " ) ;
>

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

ဥပမာ 2

အက်ခရာခြောက်လုံးစီတိုင်းပြီးရင်ကြိုးကိုတစ်ကြိမ်ခွဲပြီး "... " တစ်ခုချင်းစီကိုအပိုင်းပိုင်းထည့်ပြီးတဲ့နောက် "... " ထည့်ပါ။

 <? PHP
$ str = "Hello World!" ;
ပဲ့တင်သံ chunk_split ( $ str , 6 , "... " ) ;
>

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

သဒ္ဒါ

 chunk_split ( string , အရှည် , အဆုံး )
တေးရေး ဖေါ်ပြ
ကြိုး လိုအပ်ပါတယ် ကွဲပြားဖို့ string ကိုဖေါ်ပြသည်။
အရှည် optional ကို။ string ကိုပိတ်ပင်တားဆီးမှု၏အရှည်ကို definging ကိန်းဂဏန်းတန်ဖိုး။ ပုံသေသည် 76 ဖြစ်သည်။
အဆုံး optional ကို။ string တစ်ခုချင်းစီ၏အဆုံးမှာထားတဲ့အရာကိုသတ်မှတ်ထားတဲ့ string ကိုတန်ဖိုး။ default \ r \ n ဖြစ်ပါတယ်။
သက်ဆိုင်သောဖင်ခှ်ရှင်းများ
  • output ကို format ချ string ကို vprintf

    vprintf

    outputကိုformatချstr
  • uuencode encoded string ကို decode convert_uudecode

    convert_uudecode

    uuencodeencodedstrin
  • ဒေသဆိုင်ရာသတင်းအချက်အလက် setting setlocale

    setlocale

    ဒေသဆိုင်ရာသတင်းအချက်
  • CRC32 polynomials string ကိုတွက်ချက်ပါ crc32

    crc32

    CRC32polynomialsstri
  • string တစ်ခုအစတွင်စာလုံးများစွာကို binary ဘေးကင်းလုံခြုံနှိုင်းယှဉ်နှိုင်းယှဉ်ခြင်း (ကိစ္စတွင်အာရုံမခံစားနိုင်သော) strncasecmp

    strncasecmp

    stringတစ်ခုအစတွင်စာလ
  • 1-bit string ကိုကိုးကားချက်များနှင့်အတူပုံနှိပ်ထုတ်လွှင့် string ကိုကူးပြောင်း quoted_printable_encode

    quoted_printable_encode

    1-bitstringကိုကိုးကာ
  • string ၏အဆုံးမှာ whitespace ဇာတ်ကောင် (သို့မဟုတ်အခြားဇာတ်ကောင်) ကိုဖျက်ပါ rtrim

    rtrim

    string၏အဆုံးမှာwhite
  • ကြိုးအစားထိုးကြောင်း substrings substr_replace

    substr_replace

    ကြိုးအစားထိုးကြောင်း
လူကြိုက်များသော ဆောင်းပါးများ