MCPcopy Create free account
hub / github.com/banq/jdonframework / contains

Method contains

src/main/java/com/jdon/util/StringUtil.java:46–66  ·  view source on GitHub ↗
(String s, String text, String delimiter)

Source from the content-addressed store, hash-verified

44public class StringUtil {
45
46 public static boolean contains(String s, String text, String delimiter) {
47 if ((s == null) || (text == null) || (delimiter == null)) {
48 return false;
49 }
50
51 if (!s.endsWith(delimiter)) {
52 s += delimiter;
53 }
54
55 int pos = s.indexOf(delimiter + text + delimiter);
56
57 if (pos == -1) {
58 if (s.startsWith(text + delimiter)) {
59 return true;
60 }
61
62 return false;
63 }
64
65 return true;
66 }
67
68 public static int count(String s, String text) {
69 if ((s == null) || (text == null)) {

Callers 12

removeMethod · 0.95
getTrueInstanceMethod · 0.45
childStartedMethod · 0.45
registerAppRootMethod · 0.45
setSessionContextMethod · 0.45
methodMatchsModelGETMethod · 0.45
isStatefulMethod · 0.45
isPoolabeMethod · 0.45
getAllInterfacesMethod · 0.45
GtFunction · 0.45

Calls 1

startsWithMethod · 0.80

Tested by

no test coverage detected