| <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> |
| <!-- NewPage --> |
| <html lang="en"> |
| <head> |
| <!-- Generated by javadoc (1.8.0_144) on Wed Dec 11 21:05:30 MST 2019 --> |
| <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"> |
| <title>Strings (Apache Log4j API 2.13.0 API)</title> |
| <meta name="date" content="2019-12-11"> |
| <link rel="stylesheet" type="text/css" href="../../../../../stylesheet.css" title="Style"> |
| <script type="text/javascript" src="../../../../../script.js"></script> |
| </head> |
| <body> |
| <script type="text/javascript"><!-- |
| try { |
| if (location.href.indexOf('is-external=true') == -1) { |
| parent.document.title="Strings (Apache Log4j API 2.13.0 API)"; |
| } |
| } |
| catch(err) { |
| } |
| //--> |
| var methods = {"i0":9,"i1":9,"i2":9,"i3":9,"i4":9,"i5":9,"i6":9,"i7":9,"i8":9,"i9":9,"i10":9}; |
| var tabs = {65535:["t0","All Methods"],1:["t1","Static Methods"],8:["t4","Concrete Methods"]}; |
| var altColor = "altColor"; |
| var rowColor = "rowColor"; |
| var tableTab = "tableTab"; |
| var activeTableTab = "activeTableTab"; |
| </script> |
| <noscript> |
| <div>JavaScript is disabled on your browser.</div> |
| </noscript> |
| <!-- ========= START OF TOP NAVBAR ======= --> |
| <div class="topNav"><a name="navbar.top"> |
| <!-- --> |
| </a> |
| <div class="skipNav"><a href="#skip.navbar.top" title="Skip navigation links">Skip navigation links</a></div> |
| <a name="navbar.top.firstrow"> |
| <!-- --> |
| </a> |
| <ul class="navList" title="Navigation"> |
| <li><a href="../../../../../overview-summary.html">Overview</a></li> |
| <li><a href="package-summary.html">Package</a></li> |
| <li class="navBarCell1Rev">Class</li> |
| <li><a href="class-use/Strings.html">Use</a></li> |
| <li><a href="package-tree.html">Tree</a></li> |
| <li><a href="../../../../../deprecated-list.html">Deprecated</a></li> |
| <li><a href="../../../../../index-all.html">Index</a></li> |
| <li><a href="../../../../../help-doc.html">Help</a></li> |
| </ul> |
| </div> |
| <div class="subNav"> |
| <ul class="navList"> |
| <li><a href="../../../../../org/apache/logging/log4j/util/StringMap.html" title="interface in org.apache.logging.log4j.util"><span class="typeNameLink">Prev Class</span></a></li> |
| <li><a href="../../../../../org/apache/logging/log4j/util/Supplier.html" title="interface in org.apache.logging.log4j.util"><span class="typeNameLink">Next Class</span></a></li> |
| </ul> |
| <ul class="navList"> |
| <li><a href="../../../../../index.html?org/apache/logging/log4j/util/Strings.html" target="_top">Frames</a></li> |
| <li><a href="Strings.html" target="_top">No Frames</a></li> |
| </ul> |
| <ul class="navList" id="allclasses_navbar_top"> |
| <li><a href="../../../../../allclasses-noframe.html">All Classes</a></li> |
| </ul> |
| <div> |
| <script type="text/javascript"><!-- |
| allClassesLink = document.getElementById("allclasses_navbar_top"); |
| if(window==top) { |
| allClassesLink.style.display = "block"; |
| } |
| else { |
| allClassesLink.style.display = "none"; |
| } |
| //--> |
| </script> |
| </div> |
| <div> |
| <ul class="subNavList"> |
| <li>Summary: </li> |
| <li>Nested | </li> |
| <li><a href="#field.summary">Field</a> | </li> |
| <li>Constr | </li> |
| <li><a href="#method.summary">Method</a></li> |
| </ul> |
| <ul class="subNavList"> |
| <li>Detail: </li> |
| <li><a href="#field.detail">Field</a> | </li> |
| <li>Constr | </li> |
| <li><a href="#method.detail">Method</a></li> |
| </ul> |
| </div> |
| <a name="skip.navbar.top"> |
| <!-- --> |
| </a></div> |
| <!-- ========= END OF TOP NAVBAR ========= --> |
| <!-- ======== START OF CLASS DATA ======== --> |
| <div class="header"> |
| <div class="subTitle">org.apache.logging.log4j.util</div> |
| <h2 title="Class Strings" class="title">Class Strings</h2> |
| </div> |
| <div class="contentContainer"> |
| <ul class="inheritance"> |
| <li><a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">java.lang.Object</a></li> |
| <li> |
| <ul class="inheritance"> |
| <li>org.apache.logging.log4j.util.Strings</li> |
| </ul> |
| </li> |
| </ul> |
| <div class="description"> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <hr> |
| <br> |
| <pre>public final class <a href="../../../../../src-html/org/apache/logging/log4j/util/Strings.html#line.28">Strings</a> |
| extends <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</a></pre> |
| <div class="block"><em>Consider this class private.</em></div> |
| <dl> |
| <dt><span class="seeLabel">See Also:</span></dt> |
| <dd><a href="http://commons.apache.org/proper/commons-lang/">Apache Commons Lang</a></dd> |
| </dl> |
| </li> |
| </ul> |
| </div> |
| <div class="summary"> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <!-- =========== FIELD SUMMARY =========== --> |
| <ul class="blockList"> |
| <li class="blockList"><a name="field.summary"> |
| <!-- --> |
| </a> |
| <h3>Field Summary</h3> |
| <table class="memberSummary" border="0" cellpadding="3" cellspacing="0" summary="Field Summary table, listing fields, and an explanation"> |
| <caption><span>Fields</span><span class="tabEnd"> </span></caption> |
| <tr> |
| <th class="colFirst" scope="col">Modifier and Type</th> |
| <th class="colLast" scope="col">Field and Description</th> |
| </tr> |
| <tr class="altColor"> |
| <td class="colFirst"><code>static <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a></code></td> |
| <td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/logging/log4j/util/Strings.html#EMPTY">EMPTY</a></span></code> |
| <div class="block">The empty string.</div> |
| </td> |
| </tr> |
| <tr class="rowColor"> |
| <td class="colFirst"><code>static <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a></code></td> |
| <td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/logging/log4j/util/Strings.html#LINE_SEPARATOR">LINE_SEPARATOR</a></span></code> |
| <div class="block">OS-dependent line separator, defaults to <code>"\n"</code> if the system property <code>""line.separator"</code> cannot be |
| read.</div> |
| </td> |
| </tr> |
| </table> |
| </li> |
| </ul> |
| <!-- ========== METHOD SUMMARY =========== --> |
| <ul class="blockList"> |
| <li class="blockList"><a name="method.summary"> |
| <!-- --> |
| </a> |
| <h3>Method Summary</h3> |
| <table class="memberSummary" border="0" cellpadding="3" cellspacing="0" summary="Method Summary table, listing methods, and an explanation"> |
| <caption><span id="t0" class="activeTableTab"><span>All Methods</span><span class="tabEnd"> </span></span><span id="t1" class="tableTab"><span><a href="javascript:show(1);">Static Methods</a></span><span class="tabEnd"> </span></span><span id="t4" class="tableTab"><span><a href="javascript:show(8);">Concrete Methods</a></span><span class="tabEnd"> </span></span></caption> |
| <tr> |
| <th class="colFirst" scope="col">Modifier and Type</th> |
| <th class="colLast" scope="col">Method and Description</th> |
| </tr> |
| <tr id="i0" class="altColor"> |
| <td class="colFirst"><code>static <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a></code></td> |
| <td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/logging/log4j/util/Strings.html#dquote-java.lang.String-">dquote</a></span>(<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a> str)</code> |
| <div class="block">Returns a double quoted string.</div> |
| </td> |
| </tr> |
| <tr id="i1" class="rowColor"> |
| <td class="colFirst"><code>static boolean</code></td> |
| <td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/logging/log4j/util/Strings.html#isBlank-java.lang.String-">isBlank</a></span>(<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a> s)</code> |
| <div class="block">Checks if a String is blank.</div> |
| </td> |
| </tr> |
| <tr id="i2" class="altColor"> |
| <td class="colFirst"><code>static boolean</code></td> |
| <td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/logging/log4j/util/Strings.html#isEmpty-java.lang.CharSequence-">isEmpty</a></span>(<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/CharSequence.html?is-external=true" title="class or interface in java.lang">CharSequence</a> cs)</code> |
| <div class="block"> |
| Checks if a CharSequence is empty ("") or null.</div> |
| </td> |
| </tr> |
| <tr id="i3" class="rowColor"> |
| <td class="colFirst"><code>static boolean</code></td> |
| <td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/logging/log4j/util/Strings.html#isNotBlank-java.lang.String-">isNotBlank</a></span>(<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a> s)</code> |
| <div class="block">Checks if a String is not blank.</div> |
| </td> |
| </tr> |
| <tr id="i4" class="altColor"> |
| <td class="colFirst"><code>static boolean</code></td> |
| <td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/logging/log4j/util/Strings.html#isNotEmpty-java.lang.CharSequence-">isNotEmpty</a></span>(<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/CharSequence.html?is-external=true" title="class or interface in java.lang">CharSequence</a> cs)</code> |
| <div class="block"> |
| Checks if a CharSequence is not empty ("") and not null.</div> |
| </td> |
| </tr> |
| <tr id="i5" class="rowColor"> |
| <td class="colFirst"><code>static <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a></code></td> |
| <td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/logging/log4j/util/Strings.html#join-java.lang.Iterable-char-">join</a></span>(<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Iterable.html?is-external=true" title="class or interface in java.lang">Iterable</a><?> iterable, |
| char separator)</code> |
| <div class="block">Joins the elements of the provided <code>Iterable</code> into |
| a single String containing the provided elements.</div> |
| </td> |
| </tr> |
| <tr id="i6" class="altColor"> |
| <td class="colFirst"><code>static <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a></code></td> |
| <td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/logging/log4j/util/Strings.html#join-java.util.Iterator-char-">join</a></span>(<a href="https://docs.oracle.com/javase/8/docs/api/java/util/Iterator.html?is-external=true" title="class or interface in java.util">Iterator</a><?> iterator, |
| char separator)</code> |
| <div class="block">Joins the elements of the provided <code>Iterator</code> into |
| a single String containing the provided elements.</div> |
| </td> |
| </tr> |
| <tr id="i7" class="rowColor"> |
| <td class="colFirst"><code>static <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a></code></td> |
| <td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/logging/log4j/util/Strings.html#left-java.lang.String-int-">left</a></span>(<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a> str, |
| int len)</code> |
| <div class="block">Gets the leftmost <code>len</code> characters of a String.</div> |
| </td> |
| </tr> |
| <tr id="i8" class="altColor"> |
| <td class="colFirst"><code>static <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a></code></td> |
| <td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/logging/log4j/util/Strings.html#quote-java.lang.String-">quote</a></span>(<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a> str)</code> |
| <div class="block">Returns a quoted string.</div> |
| </td> |
| </tr> |
| <tr id="i9" class="rowColor"> |
| <td class="colFirst"><code>static <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a></code></td> |
| <td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/logging/log4j/util/Strings.html#toRootUpperCase-java.lang.String-">toRootUpperCase</a></span>(<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a> str)</code> |
| <div class="block">Shorthand for <code>str.toUpperCase(Locale.ROOT);</code></div> |
| </td> |
| </tr> |
| <tr id="i10" class="altColor"> |
| <td class="colFirst"><code>static <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a></code></td> |
| <td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/logging/log4j/util/Strings.html#trimToNull-java.lang.String-">trimToNull</a></span>(<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a> str)</code> |
| <div class="block"> |
| Removes control characters (char <= 32) from both ends of this String returning <code>null</code> if the String is |
| empty ("") after the trim or if it is <code>null</code>.</div> |
| </td> |
| </tr> |
| </table> |
| <ul class="blockList"> |
| <li class="blockList"><a name="methods.inherited.from.class.java.lang.Object"> |
| <!-- --> |
| </a> |
| <h3>Methods inherited from class java.lang.<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</a></h3> |
| <code><a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html?is-external=true#clone--" title="class or interface in java.lang">clone</a>, <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html?is-external=true#equals-java.lang.Object-" title="class or interface in java.lang">equals</a>, <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html?is-external=true#finalize--" title="class or interface in java.lang">finalize</a>, <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html?is-external=true#getClass--" title="class or interface in java.lang">getClass</a>, <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html?is-external=true#hashCode--" title="class or interface in java.lang">hashCode</a>, <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html?is-external=true#notify--" title="class or interface in java.lang">notify</a>, <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html?is-external=true#notifyAll--" title="class or interface in java.lang">notifyAll</a>, <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html?is-external=true#toString--" title="class or interface in java.lang">toString</a>, <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html?is-external=true#wait--" title="class or interface in java.lang">wait</a>, <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html?is-external=true#wait-long-" title="class or interface in java.lang">wait</a>, <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html?is-external=true#wait-long-int-" title="class or interface in java.lang">wait</a></code></li> |
| </ul> |
| </li> |
| </ul> |
| </li> |
| </ul> |
| </div> |
| <div class="details"> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <!-- ============ FIELD DETAIL =========== --> |
| <ul class="blockList"> |
| <li class="blockList"><a name="field.detail"> |
| <!-- --> |
| </a> |
| <h3>Field Detail</h3> |
| <a name="EMPTY"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>EMPTY</h4> |
| <pre>public static final <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a> <a href="../../../../../src-html/org/apache/logging/log4j/util/Strings.html#line.33">EMPTY</a></pre> |
| <div class="block">The empty string.</div> |
| <dl> |
| <dt><span class="seeLabel">See Also:</span></dt> |
| <dd><a href="../../../../../constant-values.html#org.apache.logging.log4j.util.Strings.EMPTY">Constant Field Values</a></dd> |
| </dl> |
| </li> |
| </ul> |
| <a name="LINE_SEPARATOR"> |
| <!-- --> |
| </a> |
| <ul class="blockListLast"> |
| <li class="blockList"> |
| <h4>LINE_SEPARATOR</h4> |
| <pre>public static final <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a> <a href="../../../../../src-html/org/apache/logging/log4j/util/Strings.html#line.39">LINE_SEPARATOR</a></pre> |
| <div class="block">OS-dependent line separator, defaults to <code>"\n"</code> if the system property <code>""line.separator"</code> cannot be |
| read.</div> |
| </li> |
| </ul> |
| </li> |
| </ul> |
| <!-- ============ METHOD DETAIL ========== --> |
| <ul class="blockList"> |
| <li class="blockList"><a name="method.detail"> |
| <!-- --> |
| </a> |
| <h3>Method Detail</h3> |
| <a name="dquote-java.lang.String-"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>dquote</h4> |
| <pre>public static <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a> <a href="../../../../../src-html/org/apache/logging/log4j/util/Strings.html#line.48">dquote</a>(<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a> str)</pre> |
| <div class="block">Returns a double quoted string.</div> |
| <dl> |
| <dt><span class="paramLabel">Parameters:</span></dt> |
| <dd><code>str</code> - a String</dd> |
| <dt><span class="returnLabel">Returns:</span></dt> |
| <dd><code>"str"</code></dd> |
| </dl> |
| </li> |
| </ul> |
| <a name="isBlank-java.lang.String-"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>isBlank</h4> |
| <pre>public static boolean <a href="../../../../../src-html/org/apache/logging/log4j/util/Strings.html#line.59">isBlank</a>(<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a> s)</pre> |
| <div class="block">Checks if a String is blank. A blank string is one that is <code>null</code>, empty, or when trimmed using |
| <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/String.html?is-external=true#trim--" title="class or interface in java.lang"><code>String.trim()</code></a> is empty.</div> |
| <dl> |
| <dt><span class="paramLabel">Parameters:</span></dt> |
| <dd><code>s</code> - the String to check, may be <code>null</code></dd> |
| <dt><span class="returnLabel">Returns:</span></dt> |
| <dd><code>true</code> if the String is <code>null</code>, empty, or trims to empty.</dd> |
| </dl> |
| </li> |
| </ul> |
| <a name="isEmpty-java.lang.CharSequence-"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>isEmpty</h4> |
| <pre>public static boolean <a href="../../../../../src-html/org/apache/logging/log4j/util/Strings.html#line.88">isEmpty</a>(<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/CharSequence.html?is-external=true" title="class or interface in java.lang">CharSequence</a> cs)</pre> |
| <div class="block"><p> |
| Checks if a CharSequence is empty ("") or null. |
| </p> |
| |
| <pre> |
| Strings.isEmpty(null) = true |
| Strings.isEmpty("") = true |
| Strings.isEmpty(" ") = false |
| Strings.isEmpty("bob") = false |
| Strings.isEmpty(" bob ") = false |
| </pre> |
| |
| <p> |
| NOTE: This method changed in Lang version 2.0. It no longer trims the CharSequence. That functionality is |
| available in isBlank(). |
| </p> |
| |
| <p> |
| Copied from Apache Commons Lang org.apache.commons.lang3.StringUtils.isEmpty(CharSequence) |
| </p></div> |
| <dl> |
| <dt><span class="paramLabel">Parameters:</span></dt> |
| <dd><code>cs</code> - the CharSequence to check, may be null</dd> |
| <dt><span class="returnLabel">Returns:</span></dt> |
| <dd><code>true</code> if the CharSequence is empty or null</dd> |
| </dl> |
| </li> |
| </ul> |
| <a name="isNotBlank-java.lang.String-"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>isNotBlank</h4> |
| <pre>public static boolean <a href="../../../../../src-html/org/apache/logging/log4j/util/Strings.html#line.98">isNotBlank</a>(<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a> s)</pre> |
| <div class="block">Checks if a String is not blank. The opposite of <a href="../../../../../org/apache/logging/log4j/util/Strings.html#isBlank-java.lang.String-"><code>isBlank(String)</code></a>.</div> |
| <dl> |
| <dt><span class="paramLabel">Parameters:</span></dt> |
| <dd><code>s</code> - the String to check, may be <code>null</code></dd> |
| <dt><span class="returnLabel">Returns:</span></dt> |
| <dd><code>true</code> if the String is non-<code>null</code> and has content after being trimmed.</dd> |
| </dl> |
| </li> |
| </ul> |
| <a name="isNotEmpty-java.lang.CharSequence-"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>isNotEmpty</h4> |
| <pre>public static boolean <a href="../../../../../src-html/org/apache/logging/log4j/util/Strings.html#line.122">isNotEmpty</a>(<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/CharSequence.html?is-external=true" title="class or interface in java.lang">CharSequence</a> cs)</pre> |
| <div class="block"><p> |
| Checks if a CharSequence is not empty ("") and not null. |
| </p> |
| |
| <pre> |
| Strings.isNotEmpty(null) = false |
| Strings.isNotEmpty("") = false |
| Strings.isNotEmpty(" ") = true |
| Strings.isNotEmpty("bob") = true |
| Strings.isNotEmpty(" bob ") = true |
| </pre> |
| |
| <p> |
| Copied from Apache Commons Lang org.apache.commons.lang3.StringUtils.isNotEmpty(CharSequence) |
| </p></div> |
| <dl> |
| <dt><span class="paramLabel">Parameters:</span></dt> |
| <dd><code>cs</code> - the CharSequence to check, may be null</dd> |
| <dt><span class="returnLabel">Returns:</span></dt> |
| <dd><code>true</code> if the CharSequence is not empty and not null</dd> |
| </dl> |
| </li> |
| </ul> |
| <a name="join-java.lang.Iterable-char-"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>join</h4> |
| <pre>public static <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a> <a href="../../../../../src-html/org/apache/logging/log4j/util/Strings.html#line.137">join</a>(<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Iterable.html?is-external=true" title="class or interface in java.lang">Iterable</a><?> iterable, |
| char separator)</pre> |
| <div class="block"><p>Joins the elements of the provided <code>Iterable</code> into |
| a single String containing the provided elements.</p> |
| |
| <p>No delimiter is added before or after the list. Null objects or empty |
| strings within the iteration are represented by empty strings.</p></div> |
| <dl> |
| <dt><span class="paramLabel">Parameters:</span></dt> |
| <dd><code>iterable</code> - the <code>Iterable</code> providing the values to join together, may be null</dd> |
| <dd><code>separator</code> - the separator character to use</dd> |
| <dt><span class="returnLabel">Returns:</span></dt> |
| <dd>the joined String, <code>null</code> if null iterator input</dd> |
| </dl> |
| </li> |
| </ul> |
| <a name="join-java.util.Iterator-char-"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>join</h4> |
| <pre>public static <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a> <a href="../../../../../src-html/org/apache/logging/log4j/util/Strings.html#line.155">join</a>(<a href="https://docs.oracle.com/javase/8/docs/api/java/util/Iterator.html?is-external=true" title="class or interface in java.util">Iterator</a><?> iterator, |
| char separator)</pre> |
| <div class="block"><p>Joins the elements of the provided <code>Iterator</code> into |
| a single String containing the provided elements.</p> |
| |
| <p>No delimiter is added before or after the list. Null objects or empty |
| strings within the iteration are represented by empty strings.</p></div> |
| <dl> |
| <dt><span class="paramLabel">Parameters:</span></dt> |
| <dd><code>iterator</code> - the <code>Iterator</code> of values to join together, may be null</dd> |
| <dd><code>separator</code> - the separator character to use</dd> |
| <dt><span class="returnLabel">Returns:</span></dt> |
| <dd>the joined String, <code>null</code> if null iterator input</dd> |
| </dl> |
| </li> |
| </ul> |
| <a name="left-java.lang.String-int-"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>left</h4> |
| <pre>public static <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a> <a href="../../../../../src-html/org/apache/logging/log4j/util/Strings.html#line.210">left</a>(<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a> str, |
| int len)</pre> |
| <div class="block"><p>Gets the leftmost <code>len</code> characters of a String.</p> |
| |
| <p>If <code>len</code> characters are not available, or the |
| String is <code>null</code>, the String will be returned without |
| an exception. An empty String is returned if len is negative.</p> |
| |
| <pre> |
| StringUtils.left(null, *) = null |
| StringUtils.left(*, -ve) = "" |
| StringUtils.left("", *) = "" |
| StringUtils.left("abc", 0) = "" |
| StringUtils.left("abc", 2) = "ab" |
| StringUtils.left("abc", 4) = "abc" |
| </pre> |
| |
| <p> |
| Copied from Apache Commons Lang org.apache.commons.lang3.StringUtils. |
| </p></div> |
| <dl> |
| <dt><span class="paramLabel">Parameters:</span></dt> |
| <dd><code>str</code> - the String to get the leftmost characters from, may be null</dd> |
| <dd><code>len</code> - the length of the required String</dd> |
| <dt><span class="returnLabel">Returns:</span></dt> |
| <dd>the leftmost characters, <code>null</code> if null String input</dd> |
| </dl> |
| </li> |
| </ul> |
| <a name="quote-java.lang.String-"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>quote</h4> |
| <pre>public static <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a> <a href="../../../../../src-html/org/apache/logging/log4j/util/Strings.html#line.229">quote</a>(<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a> str)</pre> |
| <div class="block">Returns a quoted string.</div> |
| <dl> |
| <dt><span class="paramLabel">Parameters:</span></dt> |
| <dd><code>str</code> - a String</dd> |
| <dt><span class="returnLabel">Returns:</span></dt> |
| <dd><code>'str'</code></dd> |
| </dl> |
| </li> |
| </ul> |
| <a name="trimToNull-java.lang.String-"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>trimToNull</h4> |
| <pre>public static <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a> <a href="../../../../../src-html/org/apache/logging/log4j/util/Strings.html#line.257">trimToNull</a>(<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a> str)</pre> |
| <div class="block"><p> |
| Removes control characters (char <= 32) from both ends of this String returning <code>null</code> if the String is |
| empty ("") after the trim or if it is <code>null</code>. |
| |
| <p> |
| The String is trimmed using <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/String.html?is-external=true#trim--" title="class or interface in java.lang"><code>String.trim()</code></a>. Trim removes start and end characters <= 32. |
| </p> |
| |
| <pre> |
| Strings.trimToNull(null) = null |
| Strings.trimToNull("") = null |
| Strings.trimToNull(" ") = null |
| Strings.trimToNull("abc") = "abc" |
| Strings.trimToNull(" abc ") = "abc" |
| </pre> |
| |
| <p> |
| Copied from Apache Commons Lang org.apache.commons.lang3.StringUtils.trimToNull(String) |
| </p></div> |
| <dl> |
| <dt><span class="paramLabel">Parameters:</span></dt> |
| <dd><code>str</code> - the String to be trimmed, may be null</dd> |
| <dt><span class="returnLabel">Returns:</span></dt> |
| <dd>the trimmed String, <code>null</code> if only chars <= 32, empty or null String input</dd> |
| </dl> |
| </li> |
| </ul> |
| <a name="toRootUpperCase-java.lang.String-"> |
| <!-- --> |
| </a> |
| <ul class="blockListLast"> |
| <li class="blockList"> |
| <h4>toRootUpperCase</h4> |
| <pre>public static <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a> <a href="../../../../../src-html/org/apache/logging/log4j/util/Strings.html#line.272">toRootUpperCase</a>(<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a> str)</pre> |
| <div class="block">Shorthand for <code>str.toUpperCase(Locale.ROOT);</code></div> |
| <dl> |
| <dt><span class="paramLabel">Parameters:</span></dt> |
| <dd><code>str</code> - The string to upper case.</dd> |
| <dt><span class="returnLabel">Returns:</span></dt> |
| <dd>a new string</dd> |
| <dt><span class="seeLabel">See Also:</span></dt> |
| <dd><a href="https://docs.oracle.com/javase/8/docs/api/java/lang/String.html?is-external=true#toLowerCase-java.util.Locale-" title="class or interface in java.lang"><code>String.toLowerCase(Locale)</code></a></dd> |
| </dl> |
| </li> |
| </ul> |
| </li> |
| </ul> |
| </li> |
| </ul> |
| </div> |
| </div> |
| <!-- ========= END OF CLASS DATA ========= --> |
| <!-- ======= START OF BOTTOM NAVBAR ====== --> |
| <div class="bottomNav"><a name="navbar.bottom"> |
| <!-- --> |
| </a> |
| <div class="skipNav"><a href="#skip.navbar.bottom" title="Skip navigation links">Skip navigation links</a></div> |
| <a name="navbar.bottom.firstrow"> |
| <!-- --> |
| </a> |
| <ul class="navList" title="Navigation"> |
| <li><a href="../../../../../overview-summary.html">Overview</a></li> |
| <li><a href="package-summary.html">Package</a></li> |
| <li class="navBarCell1Rev">Class</li> |
| <li><a href="class-use/Strings.html">Use</a></li> |
| <li><a href="package-tree.html">Tree</a></li> |
| <li><a href="../../../../../deprecated-list.html">Deprecated</a></li> |
| <li><a href="../../../../../index-all.html">Index</a></li> |
| <li><a href="../../../../../help-doc.html">Help</a></li> |
| </ul> |
| </div> |
| <div class="subNav"> |
| <ul class="navList"> |
| <li><a href="../../../../../org/apache/logging/log4j/util/StringMap.html" title="interface in org.apache.logging.log4j.util"><span class="typeNameLink">Prev Class</span></a></li> |
| <li><a href="../../../../../org/apache/logging/log4j/util/Supplier.html" title="interface in org.apache.logging.log4j.util"><span class="typeNameLink">Next Class</span></a></li> |
| </ul> |
| <ul class="navList"> |
| <li><a href="../../../../../index.html?org/apache/logging/log4j/util/Strings.html" target="_top">Frames</a></li> |
| <li><a href="Strings.html" target="_top">No Frames</a></li> |
| </ul> |
| <ul class="navList" id="allclasses_navbar_bottom"> |
| <li><a href="../../../../../allclasses-noframe.html">All Classes</a></li> |
| </ul> |
| <div> |
| <script type="text/javascript"><!-- |
| allClassesLink = document.getElementById("allclasses_navbar_bottom"); |
| if(window==top) { |
| allClassesLink.style.display = "block"; |
| } |
| else { |
| allClassesLink.style.display = "none"; |
| } |
| //--> |
| </script> |
| </div> |
| <div> |
| <ul class="subNavList"> |
| <li>Summary: </li> |
| <li>Nested | </li> |
| <li><a href="#field.summary">Field</a> | </li> |
| <li>Constr | </li> |
| <li><a href="#method.summary">Method</a></li> |
| </ul> |
| <ul class="subNavList"> |
| <li>Detail: </li> |
| <li><a href="#field.detail">Field</a> | </li> |
| <li>Constr | </li> |
| <li><a href="#method.detail">Method</a></li> |
| </ul> |
| </div> |
| <a name="skip.navbar.bottom"> |
| <!-- --> |
| </a></div> |
| <!-- ======== END OF BOTTOM NAVBAR ======= --> |
| <p class="legalCopy"><small><p align="center">Copyright © 1999-2019 <a href="https://www.apache.org/">The Apache Software Foundation</a>. All Rights Reserved.<br /> Apache Logging, Apache Log4j, Log4j, Apache, the Apache feather logo, the Apache Logging project logo, and the Apache Log4j logo are trademarks of The Apache Software Foundation.</p></small></p> |
| </body> |
| </html> |