public enum StringHelpers extends Enum<StringHelpers> implements com.github.jknack.handlebars.Helper<Object>
| Enum Constant and Description |
|---|
endsWith
Indicates whether the string ends with the given value.
|
startsWith
Indicates whether the string starts with the given value.
|
| Modifier and Type | Method and Description |
|---|---|
static StringHelpers |
valueOf(String name)
Returns the enum constant of this type with the specified name.
|
static StringHelpers[] |
values()
Returns an array containing the constants of this enum type, in
the order they are declared.
|
public static final StringHelpers startsWith
{{startsWith a b ["insensitive"]}}
{{startsWith a text='b' [insensitive=true]}}
Render 'yes' or 'no':
{{#startsWith a b}}
yes
{{else}}
no
{{/startsWith}}
Render 'true' or 'false':
{{startsWith a b}}
Render 'y' or 'n':
{{startsWith a b yes='y' no='n'}}
public static final StringHelpers endsWith
{{endsWith a b ["insensitive"]}}
{{endsWith a text='b' [insensitive=true]}}
Render 'yes' or 'no':
{{#endsWith a b}}
yes
{{else}}
no
{{/endsWith}}
Render 'true' or 'false':
{{endsWith a b}}
Render 'y' or 'n':
{{endsWith a b yes='y' no='n'}}
public static StringHelpers[] values()
for (StringHelpers c : StringHelpers.values()) System.out.println(c);
public static StringHelpers valueOf(String name)
name - the name of the enum constant to be returned.IllegalArgumentException - if this enum type has no constant with the specified nameNullPointerException - if the argument is nullCopyright © 2023. All rights reserved.