public final class SplitLimit extends Object
String.split(String)
and
Pattern.split(CharSequence)
should not be used as
trailing empty strings are discarded. That might be confusing.
Use Pattern.split(CharSequence, int)
instead and
think about the limit
parameter. Use NO_LIMIT
to not strip
empty trailing strings.
Modifier and Type | Field and Description |
---|---|
static int |
NO_LIMIT
No limit.
|
static int |
NO_LIMIT_AND_STRIP_EMPTY_TRAILING
No limit and strip empty trailing strings.
|
public static final int NO_LIMIT
This value is meant to be used by either
Pattern.split(CharSequence, int)
or
String.split(String, int)
.
public static final int NO_LIMIT_AND_STRIP_EMPTY_TRAILING
This value is meant to be used by either
Pattern.split(CharSequence, int)
or
String.split(String, int)
.
Copyright © 2025. All rights reserved.