@Test public void testGetSubstring() { assertEquals("asdf", Utils.getSubstring("name=asdf")); assertEquals("asdf=asdf", Utils.getSubstring("name=asdf=asdf")); assertEquals("", Utils.getSubstring("name=")); assertNull("", Utils.getSubstring("name")); }
public static final String getSubstring(String string) { if (string.contains("=")) { return string.substring(string.indexOf("=") + 1); } return null; }
Utils { public static final String getSubstring(String string) { if (string.contains("=")) { return string.substring(string.indexOf("=") + 1); } return null; } }
Utils { public static final String getSubstring(String string) { if (string.contains("=")) { return string.substring(string.indexOf("=") + 1); } return null; } private  Utils(); }
Utils { public static final String getSubstring(String string) { if (string.contains("=")) { return string.substring(string.indexOf("=") + 1); } return null; } private  Utils(); static final String getSubstring(String string); }
Utils { public static final String getSubstring(String string) { if (string.contains("=")) { return string.substring(string.indexOf("=") + 1); } return null; } private  Utils(); static final String getSubstring(String string);  }