the display, a Chinese character or a Japanese-Korean length of 1, an English character length of 0.5** @param string s need to get length strings* The string length obtained @return int*/public static double GetLength (String s) {Double valuelength = 0;String Chinese = "[\u4e00-\u9fa5]";Gets the length of the field value, if it contains Chinese characters, the length of each Chinese character is 2, otherwise 1for (int i = 0; i Get a characterString temp = s.substring (i, i + 1);Determines whet
Use regular expressions to remove all punctuation in a string
Copy Code code as follows:
Extracting HTML Chinese text with regular expressions
Copy Code code as follows:
Regular expressions that match any character, including both English and any punctuation
Regex: \\w*|\\w*| [\\u4e00-\\u9fa5] This expression matches an arbitrary Chinese-English character.Where: \w:a word character: [a-za-z_0-9] (matches a word character); Where: \w:a non-word character: [^\w] (match a non-word character); Where: [\\u4e00-\\u9fa5]: Match a Chinese character;
ref:http://saltdstar.iteye.com/blog/1041690Ref:http://www.jb51.net/article/1
Finishing staff: Anchor
Finishing Date: Date
I find it unfamiliar to many symbols, but sometimes it is necessary.
Search engine searched for a few and did not search the complete, so collated a copy for inspection.
Welcome to correction, also welcome to add.
Common punctuation
English name
Chinese name
symbols
pronunciation
Chinese Approximate pronunciation
Leftparen
Opening parenthesis
(
CSS text overflow ellipsis
Text-overflow:ellipsis
Ext-overflow is a special attribute, which is defined by the previous document in the current document (which does not contain the Text-overflow attribute, fml!):
Name:text-overflow-modeValue:clip | ellipsis | Ellipsis-wordClip: Do not show ellipsis (...). ), but sim
CSS single row overflow text display ellipsis... method (compatible with IE ff) (convert)
Html
Code :
CSS code:Div {Width: 200px;/* basic definition of the container */Height: 200px;Background-color: # Eee;}
/* Style under ie */P span {Display: block;Width: 200px;/* defines the width. Modify the width as needed */Overflow: hidden;White-space: nowrap;Text-overflow: ellipsis;}
/* Style under FF */P
1. General CSS Method--can implement Ie,safari,chrome,opera browser text overflow ellipsis representationThis is a test text, mainly used to test whether the text overflow will be displayed with ellipses.
The code is as follows
Copy Code
Zxx_text_overflow_1{width:27em; white-space:nowrap; text-overflow:ellipsis;-o-text-overflow:ellipsis; overflow: Hidden;}
2. Use Ellipsis.xml file to enable Firefox to support tex
CSS text wrapping and ellipsisPosted in 2011/04/22Some of the relevant properties and W3Schools are referenced below:The White-space property sets how to handle whitespace within an element.Http://www.w3schools.com/css/pr_text_white-space.aspWhite-space:normal | Nowarp | Pre | Pre-line | Pre-warp | InheritWord-warp property setting How to handle a word's wrappingHttp://www.w3schools.com/css3/css3_pr_word-wrap.aspWord-wrap:normal | Break-wordWord-break property set How to handle word break, only
Code: Overflow:hidden; white-space:nowrap; text-overflow:ellipsis;Key code:text-overflow:ellipsis;Explanation: The simple understanding is that I want to limit the text to one line (white-space:nowrap;), that the line is bound (width), and that the part of your overflow is to be hidden (overflow:hidden;), and then an ellipsis ( text-overflow:ellipsis). Text-ellipsis is a special style, and the explanation i
the difference of several ellipsis in MathType
1. Horizontal ellipsis
The horizontal ellipsis is the most used ellipsis and is used when parsing multiple formulas and variables, which can be edited directly in the MathType "Space and Ellipse"-"horizontal ellipsis". This
The CSS controls the list of articles so that the text that overflows the title behaves in an elliptical way. with the above code can be implemented, but if you want to achieve the effect of the combination of multiple CSS definition can be achieved. below let's look at the definition of each CSS inside: Text-overflow:clip | Ellipsis Value: Clip: Default value. Do not show ellipsis (...), but simple
Original: CSS Learning Note: Overflow text ellipsis (text-overflow)In CSS3, the basic syntax for the Text-overflow property is as follows:
Clip: Indicates that the omitted text is not displayed and is simply trimmed.
Ellipsis: Indicates that an ellipsis is displayed when an object text overflows, and the caret insertion position is the last character
Someone would ask, why did I putText-overflowTake it out and explain it alone. Previously, when a line of content was not complete, you would want to display the ellipsis byJavaScriptand other means. But CSS3 introduced aText-overflowEllipsis attributes, only need a short line of code can be implemented, the development of a simple and powerful way of self-evident. This article, I said to lead you to make a "today headline" News navigation list, to le
It is common in Web development. That is, the text is too long, and the container of the text is not long enough, and we do not want to wrap the text, so we want to use ellipsis to solve this problem. However, in today's HTML standards, there are no relevant identifiers or attributes that allow you to simply do this. But we can use CSS style sheets to do this. It can be used in IE, Safari, Chrome, and Opera. But it does not work in Firefox, but we can
If the implementation of a single line of text overflow display ellipsis students should know to use the Text-overflow:ellipsis attribute, of course, also need to add width of the genus to be compatible with some of the browsing.Implementation method:1 Overflow:hidden; 2 text-overflow:ellipsis; 3 White-space:nowrap;EffectBut this property only supports a single line of text overflow display ellipsis, if we
About Python data analysis in the Pandas module in the output, the middle of each line will have ellipses appear, and lines and lines in the middle of the ellipsis .... Problem, most of the other sites (Baidu) are written blindly, is simply copy paste the previous version, you want to know the answer to other questions you have to read the official documents.1 #!/usr/bin/python2 #-*-coding:utf-8-*-3 ImportNumPy as NP4 ImportPandas as PD5 ImportMySQLdb
White-space:nowrap;text-overflow:ellipsis; Overflow:hidden;
Text-overflow:clip | EllipsisTake value:Clip: Default value. Do not display ellipsis (...), but simple trimmingEllipsis: Displays an ellipsis (...) when text in an object overflows.
White-space:normal | Pre | NoWrap Value:Normal: Default value. The default processing method. Text is automatically processed for line wrapping. If you reach the cont
Label: style blog Io OS ar Java for SP
I encountered a problem during my project today. I posted it here to let the experts think about a better method.
When the data is displayed, if the string is too long, a string of a certain length will be captured and then displayed with a ellipsis. It can be a letter or a Chinese character, and the length of uppercase and lowercase letters is different even though the length is the same, is there any way to
Show ellipsis effect after JavaScript exceeds container
In the actual project, due to the length of the text content uncertainty and the fixed page layout, it is inevitable that the text content over the div (or other tags, the same below) area of the situation, at this time the better practice is when the text exceeds the qualified div width automatically with the ellipsis (...). It shows that, in this wa
Zhanhailiang Date: 2014-10-24Not to do the front-end for a long time, today from the refactoring to understand that CSS3 has been able to achieve a lot of the past must be achieved through JS, such as gradients, shadows, automatic truncation of text display ellipsis and other powerful effects, and these features are maturing, has been used in a large number of production environments. The H5 is really maturing, and has to be made up of evil.The follow
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.