1
0
Fork 0
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:
Florian Schmaus 2017-06-17 11:41:35 +02:00
parent 8038b7a3e1
commit 5424c9635f

View file

@ -1,6 +1,6 @@
/**
*
* Copyright 2014-2015 Florian Schmaus
* Copyright 2014-2017 Florian Schmaus
*
* Licensed under the Apache License, Version 2.0 (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;
}
public XmlStringBuilder optXmlLangAttribute(String lang) {
if (lang != null) {
xmllangAttribute(lang);
}
return this;
}
public XmlStringBuilder escape(String text) {
assert text != null;
sb.append(StringUtils.escapeForXml(text));