Perl String Functions
来源:互联网 发布:好看的古代言情知乎 编辑:程序博客网 时间:2024/05/17 18:24
Perl String Functions
chomp
Removes line ending characters from a string or array of strings.
chop
Removes the last character from a string or array of strings.
chop STRING
eval
Evaluates perl code, then executes it.
eval STRING
Any errors are returned in the @a variable.
index
This function returns the position of the first occurance of the specified SEARCH string. If POSITION is specified, the occurance at or after the position is returned. The value -1 is returned if the SEARCH string is not found.
rindex STRING,SEARCH,POSITIONrindex STRING,SEARCH
length
Returns the length of the string in bytes.
length STRING
lc
Converts all characters in the string to lower case.
lc Str
<script type="text/javascript"><!--google_ad_client = "pub-0057014352875780";google_ad_width = 120;google_ad_height = 600;google_ad_format = "120x600_as";google_ad_channel ="2584929872";google_color_border = ["336699","000000","B4D0DC","A8DDA0"];google_color_bg = ["FFFFFF","F0F0F0","ECF8FF","EBFFED"];google_color_link = ["0000FF","0000FF","0000CC","0000CC"];google_color_url = "008000";google_color_text = ["000000","000000","6F6F6F","6F6F6F"];//--></script><script src="http://pagead2.googlesyndication.com/pagead/show_ads.js" type="text/javascript"></script>lcfirst
Takes a string and retruns it with the first character in lower case.
lcfirst Str1
quotemeta
rindex
This function returns the position of the last occurance of the specified SEARCH string. If POSITION is specified, the occurance at or before the position is returned. The value -1 is returned if the SEARCH string is not found.
rindex STRING,SEARCH,POSITIONrindex STRING,SEARCH
substr
This function supports three sets of passed values as follows:
substr (STRING,OFFSET,LEN,REPLACEMENT)substr (STRING,OFFSET,LEN)substr (STRING,OFFSET)
The function:
substr (STRING,OFFSET)
returns all characters in the string after the designated offset from the start of the passed string. The function:
substr (STRING,OFFSET,LEN)
returns all characters in the string after the designated offset from the start of the passed string up to the number of characters designated by LEN. The function:
substr (STRING,OFFSET,LEN,REPLACEMENT)
Replaces the part of the string beginning at OFFSET of the length LEN with the REPLACEMENT string.
uc
Converts all characters in the string to upper case.
uc Str
ucfirst
Takes a string and retruns it with the first character in upper case.
ucfirst Str1
- Perl String Functions
- Learning Perl: 6.3. Hash Functions
- C++ string functions
- tchar string functions
- Simple String Compression Functions
- Basic String Handling Functions
- Oracle SQL string functions
- XPath(6) string functions
- wxWidgets String functions
- PHP FUNCTIONS: n12br('string')
- SAS String Functions
- String hash functions
- Impala String Functions
- The Perl Tutorial: Functions (4)
- 打卡:10 perl string
- a common misunderstanding of string.Trim functions
- PHP中的字符串函数(String Functions)
- PHP中的字符串函数(String Functions)
- 系统权限设计(1)
- 04.12.2005 林大单一打球日记——打法正在改变
- Oracle傻瓜问题1000问,网上采的
- Java性能的优化
- 信息安全:政府部门与公共机构
- Perl String Functions
- 经典句子(一)
- 平衡二叉树的
- property EnableBCD
- 克莱登情结
- 对学术规范的一点思考
- 经典的句子(二)
- 我与体育
- appfuse1.7配置说明存在错误