mirror of
https://codeberg.org/Mercury-IM/Smack
synced 2024-11-22 06:12:05 +01:00
Add XmlStringBuilder.optXmlLangAttribute(String)
This commit is contained in:
parent
8038b7a3e1
commit
5424c9635f
1 changed files with 8 additions and 1 deletions
|
@ -1,6 +1,6 @@
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
* Copyright 2014-2015 Florian Schmaus
|
* Copyright 2014-2017 Florian Schmaus
|
||||||
*
|
*
|
||||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
* you may not use this file except in compliance with the License.
|
* you may not use this file except in compliance with the License.
|
||||||
|
@ -360,6 +360,13 @@ public class XmlStringBuilder implements Appendable, CharSequence {
|
||||||
return this;
|
return this;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public XmlStringBuilder optXmlLangAttribute(String lang) {
|
||||||
|
if (lang != null) {
|
||||||
|
xmllangAttribute(lang);
|
||||||
|
}
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
public XmlStringBuilder escape(String text) {
|
public XmlStringBuilder escape(String text) {
|
||||||
assert text != null;
|
assert text != null;
|
||||||
sb.append(StringUtils.escapeForXml(text));
|
sb.append(StringUtils.escapeForXml(text));
|
||||||
|
|
Loading…
Reference in a new issue