本文整理了Java中org.jdom2.Text.normalizeString()
方法的一些代码示例,展示了Text.normalizeString()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Text.normalizeString()
方法的具体详情如下:
包路径:org.jdom2.Text
类名称:Text
方法名:normalizeString
[英]This returns a new string with all surrounding whitespace removed and internal whitespace normalized to a single space. If only whitespace exists, the empty string is returned.
Per XML 1.0 Production 3 whitespace includes: #x20, #x9, #xD, #xA
[中]这将返回一个新字符串,删除所有周围的空格,并将内部空格规范化为单个空格。如果只存在空白,则返回空字符串。
根据XML 1.0产品,3个空格包括:#x20、#x9、#xD、#xA
代码示例来源:origin: org.jdom/jdom
/**
* Returns the textual content of this element with all surrounding
* whitespace removed and internal whitespace normalized to a single space.
* If no textual value exists for the element, or if only whitespace exists,
* the empty string is returned.
*
* @return normalized text content for this element, or
* empty string if none
*/
public String getTextNormalize() {
return Text.normalizeString(getText());
}
代码示例来源:origin: org.jdom/jdom
/**
* This returns the textual content with all surrounding whitespace
* removed and internal whitespace normalized to a single space. If
* only whitespace exists, the empty string is returned.
*
* @return normalized text content or empty string
*/
public String getTextNormalize() {
return normalizeString(getText());
}
代码示例来源:origin: Renanse/Ardor3D
switch (bufferType) {
case Float: {
final String normalizedText = Text.normalizeString(text);
if (normalizedText.length() == 0) {
return new Text("");
final String normalizedText = Text.normalizeString(text);
if (normalizedText.length() == 0) {
return new Text("");
final String normalizedText = Text.normalizeString(text);
if (normalizedText.length() == 0) {
return new Text("");
final String normalizedText = Text.normalizeString(text);
if (normalizedText.length() == 0) {
return new Text("");
+ count, e);
return new Text(Text.normalizeString(text));
代码示例来源:origin: apache/marmotta
description.setText(Text.normalizeString(pom.getDescription()));
pack.addContent(description);
内容来源于网络,如有侵权,请联系作者删除!