Class: String
Source Location: /php/lang/String.php
Class String
Class Overview
¹®ÀÚ¿ À¯Æ¿¸®Æ¼ Ŭ·¡½º
¸ÅĪÅ×À̺í String ¸Þ¼Òµå => ¹®ÀÚ¿ÇÔ¼ö
addcslashes => addcslashes
addslashes => addslashes
bin2hex => bin2hex
chop => chop
chr => chr
count_chars => count_chars
entity_encode => htmlentities
entity_decode => html_entity_decode
explode => explode
implode => implode
join => join
ltrim => ltrim
md5 => md5
nl2br => nl2br
ord => ord
parse => parse_str
print => print
printf => printf
rtrim => rtrim
similar => similar_text
soundex => soundex
sprintf => sprintf
sscanf => sscanf
ireplace => str_ireplace
pad => str_pad
repeat => str_repeat
replace => str_replace
rot13 => str_rot13
shuffle => str_shuffle
count_split => str_split
word_count => str_word_count
casecmp => strcasecmp
cmp => strcmp
coll => strcoll
strip => strip_tags
stripcslashes => stripcslashes
ipos => stripos
stripslashes => stripslashes
istr => stristr
len => strlen
natcasecmp => strnatcasecmp
natcmp => strnatcmp
ncasecmp => strncasecmp
ncmp => strncmp
pbrk => strpbrk
pos => strpos
last_string => strrchr
reverse => strrev
reverse_ipos => strripos
reverse_pos => strrpos
first_string => strstr
lower => strtolower
upper => strtoupper
translate => strtr
sub_compare => substr_compare
sub_count => substr_count
sub_replace => substr_replace
substring => substr
trim => trim
ucfirst => ucfirst
ucwords => ucwords
wrap => wordwrap
iconv => iconv
base64_encode => base64_encode
base64_decode => base64_decode
build_query => http_build_query
parse_url => parse_url
rawencode => rawurlencode
rawdecode => rawurldecode
urlencode => urlencode
urldecode => urldecode
highlight => highlight_string
phpstrip => php_strip_whitespace
constant => constant
split => split
spliti => spliti
number => number_format
money => money_format
pmatch_all => preg_match_all
pmatch => preg_match
preg_qoute => preg_qoute
preplace_callback => preg_replace_callback
preplace => preg_replace
psplit => preg_split
Located in /php/lang/String.php [line 107]
PObject
|
--String
Author(s):
Information Tags:
|
Methods
|
Inherited Properties, Constants, and Methods
Method Summary
static
string
|
cut() |
¹®ÀÚ¿ ÀÚ¸£±â (¼öÁ¤ ÇÊ¿ä) php_mbstring.dll ·Îµå ÇÊ¿ä |
static
string
|
getEUCKR() |
EUC-KR ÇüÅ·Π¹®ÀÚ¿ º¯È¯ (php5´Â iconv ¸ðµâ ±âº» žÀç) |
static
string
|
getUTF8() |
UTF-8 ÇüÅ·Π¹®ÀÚ¿ º¯È¯ (php5´Â iconv ¸ðµâ ±âº» žÀç) |
int |
getPos() |
¸Å°³º¯¼ö À§Ä¡ ¾ò±â |
String |
r() |
ÂüÁ¶°¡ ¾Æ´Ñ »óÅ ÇÔ¼ö¸¦ ¾µ ¶§ ÀÚµ¿À¸·Î ÂüÁ¶ÇüÅ·ΠÀüȯ |
Methods
static string cut(
string
$str, int
$length, [string
$subfix = "..."]
)
|
|
¹®ÀÚ¿ ÀÚ¸£±â (¼öÁ¤ ÇÊ¿ä) php_mbstring.dll ·Îµå ÇÊ¿ä
Parameters:
string |
$str: |
¹®ÀÚ¿ |
int |
$length: |
ÀÚ¸£´Â ±æÀÌ |
string |
$subfix: |
µÚ¿¡ ºÙÀ» ¹®ÀÚ¿, ±âº»°ª "..." |
API Tags:
static string getEUCKR(
string
$str, [string
$encoding = 'UTF-8']
)
|
|
EUC-KR ÇüÅ·Π¹®ÀÚ¿ º¯È¯ (php5´Â iconv ¸ðµâ ±âº» žÀç)
Parameters:
string |
$str: |
º¯È¯µÉ ¹®ÀÚ¿ |
string |
$encoding: |
ÀÌÀü ÀÎÄÚµù |
API Tags:
static string getUTF8(
string
$str, [string
$encoding = 'CP949']
)
|
|
UTF-8 ÇüÅ·Π¹®ÀÚ¿ º¯È¯ (php5´Â iconv ¸ðµâ ±âº» žÀç)
Parameters:
string |
$str: |
º¯È¯µÉ ¹®ÀÚ¿ |
string |
$encoding: |
ÀÌÀü ÀÎÄÚµù |
API Tags:
static array matchTag(
string
$tagName, string
$subject, [boolean
$isOne = true]
)
|
|
ÅÂ±× ºñ±³, »ý¼º
Parameters:
string |
$tagName: |
ÅÂ±× À̸§ |
string |
$subject: |
°Ë»öµÉ ¹®ÀÚ¿ |
boolean |
$isOne: |
true : One ű×, false : Two ÅÂ±× |
API Tags:
Return: | tag : ÅÂ±× À̸§, body : ¸ÅĪ ¹®ÀÚ¿, id : ¾ÆÀ̵ð, attribute : ¼Ó¼º, description : ³»¿ë, convert : º¯È¯ ³»¿ë |
Access: | public |
static array matchTagCallBack(
string
$tagName, string
$subject, boolean
$isOne, callback
$callback
)
|
|
ÅÂ±× »ý¼º
callback ÇÔ¼ö´Â ±âº»ÀûÀ¸·Î attribute, description À» ÀÌ¿ëÇØ¼ convert¸¦ »ý¼ºÇÏ´Â ÇÔ¼öÀÌ´Ù. ±âº» ÇüÅ´ function callback_func(&$obj) {
$obj['convert'] = str_replace("\n", "<br>", $obj['description']);
}
callback ÇÔ¼ö°¡ Ŭ·¡½ºÀÇ ¸Þ¼Òµå¶ó¸é class AAA {
function callback_func(&$obj) {
}
}
$class = new AAA;
array($class, 'callback_func');
ÇØ¼ callback ÇÔ¼ö ºÎºÐ¿¡ ³Ö¾î ÁÖ¸é µÈ´Ù.
Parameters:
string |
$tagName: |
ÅÂ±× À̸§ |
string |
$subject: |
°Ë»öµÉ ¹®ÀÚ¿ |
boolean |
$isOne: |
true : One ű×, false : Two ÅÂ±× |
callback |
$callback: |
callback ÇÔ¼ö |
API Tags:
Return: | tag : ÅÂ±× À̸§, body : ¸ÅĪ ¹®ÀÚ¿, id : ¾ÆÀ̵ð, attribute : ¼Ó¼º, description : ³»¿ë, convert : º¯È¯ ³»¿ë |
Access: | public |
static string matchTagReplace(
string
$tagName, string
$subject, boolean
$isOne, callback
$callback
)
|
|
¹®ÀÚ¿ º¯È¯
Parameters:
string |
$tagName: |
ÅÂ±× À̸§ |
string |
$subject: |
°Ë»öµÉ ¹®ÀÚ¿ |
boolean |
$isOne: |
true : One ű×, false : Two ÅÂ±× |
callback |
$callback: |
callback ÇÔ¼ö |
API Tags:
Return: | º¯È¯µÈ $subject |
Access: | public |
callback getFunction(
string
$method
)
|
|
½ÇÁ¦ ½ÇÇàµÉ ÇÔ¼ö
Parameters:
string |
$method: |
½ÇÇàµÉ ÇÔ¼ö À̸§ |
API Tags:
Return: | ÄݹéÀ̸§ |
Access: | public |
int getPos(
string
$method
)
|
|
¸Å°³º¯¼ö À§Ä¡ ¾ò±â
Parameters:
string |
$method: |
½ÇÇàµÉ ÇÔ¼ö À̸§ |
API Tags:
Return: | ¸Å°³º¯¼ö À§Ä¡ |
Access: | public |
ÂüÁ¶°¡ ¾Æ´Ñ »óÅ ÇÔ¼ö¸¦ ¾µ ¶§ ÀÚµ¿À¸·Î ÂüÁ¶ÇüÅ·ΠÀüȯ
API Tags:
String ref(
[bool
$is_ref = true]
)
|
|
ÇöÀç ÂüÁ¶»óÅ Àüȯ
Parameters:
bool |
$is_ref: |
ÂüÁ¶ »óÅÂ, trueÀÌ¸é ¹«Á¶°Ç ÂüÁ¶ Àû¿ë, ±âº»°ª true, |
API Tags:
void setFunctionList(
string
$name, string|array
$run, int
$pos
)
|
|
Àû¿ëµÉ ÇÔ¼ö ¼³Á¤
Parameters:
string |
$name: |
ÇÔ¼öÀ̸§ |
string|array |
$run: |
callback |
int |
$pos: |
¸Å°³º¯¼ö À§Ä¡ |
API Tags:
String __call(
$method,
$args
)
|
|
string °ü·ÃÇÔ¼ö ÀÚµ¿½ÇÇà
Parameters:
API Tags:
|
|