public class StringUtil extends Object
| Modifier and Type | Method and Description |
|---|---|
static boolean |
containsText(String str,
String text)
Checks whether the text exist in string or not.
|
static boolean |
containsWord(String str,
String word)
Checks whether a word present in a string.
|
static boolean |
endWithText(String str,
String text)
Checks if string ends with a text.
|
static boolean |
isEmptyAfterTrim(String str) |
static boolean |
isEmptyNoTrim(String str) |
static boolean |
startsWithText(String str,
String text)
Checks if the string starts with text.
|
static String |
trim(String str)
Trims the leading and trailing spaces
|
public static String trim(String str)
str - public static boolean isEmptyAfterTrim(String str)
public static boolean isEmptyNoTrim(String str)
public static boolean containsText(String str, String text)
str - text - public static boolean startsWithText(String str, String text)
str - text - public static boolean endWithText(String str, String text)
str - text - Copyright © 2021. All rights reserved.