Metric Fast Development platform There is a Len in the base function that gets the character length function. The specific usage is:len ("123ABC string")The result of this method is: 9that is, the total number of characters, without distinguishing
Use El expressions to intercept string/get list length instances. el expressions
$ {Fn: substring (wjcd. lrsj, 0, 16 )}
Use the functions function to obtain the list length.
${fn:length(list)}
Function Description Example
Fn: containsDetermine
Chinese websites generally choose two types of code: gbk/gb2312 or Utf-8.
Each Chinese character in the GBK encoding occupies 2 bytes, as an example:
$zhStr = ‘您好,中国!’;echo strlen($zhStr// 输出:12
utf-8编码下每个中文字符所占字节为3,例:
$zhStr = ‘您好,中国!’;echo strlen(
In some Web site registration or other activities, we need users to submit some information, for this information will have certain requirements, such as user registration information Some of the limit length can not be less than how much. Here we
Citation: http://songjianyong.iteye.com/blog/1552973 Packagecn.com.songjy.test; Importjava.io.UnsupportedEncodingException; /*** Two ways to get string lengths in Java by byte **/ Public classApp { Public Static voidMain (string[]
Title: Enter a string that outputs the maximum length of the symmetric substring in the string. For example, the input string "Google", because the longest symmetric substring in the string is "goog", so output 4.
Analysis: Many people may have
Linux shell string operation detailed (length, read, replace, intercept, connect, compare, delete, position) 1. Linux Shell intercepts the first 8 bits of a character variableThere are several ways to implement this:
Expr substr "$a" 1 8
4.5.8 String Length
The length of a string usually refers to the number of characters in a string, but sometimes people need the number of bytes occupied by the string. The following methods are commonly used to obtain the length of a string.
1. Use
I used to think that 1024 bytes (that is, the total length of the URL including the query string), today I heard someone say 256 bytes ...
I tested it and found it was notFIREFOX,CHROME,IE9, the maximum allowable length is 8193 bytes
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.