/** * Gets the substring after the first occurrence given char. * * @param c * char to scan for * @return the substring */ public final String afterFirst(final char c) { return Strings.afterFirst(text, c); }
/** * Gets the substring after the first occurrence given char. * * @param c * char to scan for * @return the substring */ public final String afterFirst(final char c) { return Strings.afterFirst(text, c); }
/** * Gets the substring after the first occurrence given char. * * @param c * char to scan for * @return the substring */ public final String afterFirst(final char c) { return Strings.afterFirst(text, c); }
/** * Gets everything after the first path component of a path using a given separator. If the * separator cannot be found, an empty String is returned. * <p> * For example, afterFirstPathComponent("foo.bar.baz", '.') would return "bar.baz" and * afterFirstPathComponent("foo", '.') would return "". * * @param path * The path to parse * @param separator * The path separator character * @return Everything after the first component in the path */ public static String afterFirstPathComponent(final String path, final char separator) { return afterFirst(path, separator); }
/** * Gets everything after the first path component of a path using a given separator. If the * separator cannot be found, an empty String is returned. * <p> * For example, afterFirstPathComponent("foo:bar:baz", ':') would return "bar:baz" and * afterFirstPathComponent("foo", ':') would return "". * * @param path * The path to parse * @param separator * The path separator character * @return Everything after the first component in the path */ public static String afterFirstPathComponent(final String path, final char separator) { return afterFirst(path, separator); }
/** * Gets everything after the first path component of a path using a given separator. If the * separator cannot be found, an empty String is returned. * <p> * For example, afterFirstPathComponent("foo:bar:baz", ':') would return "bar:baz" and * afterFirstPathComponent("foo", ':') would return "". * * @param path * The path to parse * @param separator * The path separator character * @return Everything after the first component in the path */ public static String afterFirstPathComponent(final String path, final char separator) { return afterFirst(path, separator); }
/** * Gets everything after the first path component of a path using a given separator. If the * separator cannot be found, an empty String is returned. * <p> * For example, afterFirstPathComponent("foo.bar.baz", '.') would return "bar.baz" and * afterFirstPathComponent("foo", '.') would return "". * * @param path * The path to parse * @param separator * The path separator character * @return Everything after the first component in the path */ public static String afterFirstPathComponent(final String path, final char separator) { return afterFirst(path, separator); }
/** * Extract specific from resource string * @param name name to transform * @return specific resource or null */ public static String getResourceSpecific(String name) { ORule.ResourceGeneric generic = getResourceGeneric(name); String specific = generic!=null?Strings.afterFirst(name, '.'):name; return Strings.isEmpty(specific)?null:specific; }
/** * Extract specific from resource string * @param name name to transform * @return specific resource or null */ public static String getResourceSpecific(String name) { ORule.ResourceGeneric generic = getResourceGeneric(name); String specific = generic!=null?Strings.afterFirst(name, '.'):name; return Strings.isEmpty(specific)?null:specific; }
prefix = Strings.afterFirst(prefix, '.');
prefix = Strings.afterFirst(prefix, '.');
prefix = Strings.afterFirst(prefix, '.');
@Override protected OProperty doBackward(String b) { ODatabaseDocument db = OrientDbWebSession.get().getDatabase(); OSchema schema = db.getMetadata().getSchema(); String className = Strings.beforeFirst(b, '.'); String propertyName = Strings.afterFirst(b, '.'); OClass oClass = schema.getClass(className); return oClass.getProperty(propertyName); }
@Override protected OProperty doBackward(String b) { ODatabaseDocument db = OrientDbWebSession.get().getDatabase(); OSchema schema = db.getMetadata().getSchema(); String className = Strings.beforeFirst(b, '.'); String propertyName = Strings.afterFirst(b, '.'); OClass oClass = schema.getClass(className); return oClass.getProperty(propertyName); }
prefix = Strings.afterFirst(prefix, '.');
fullChildId = Strings.afterFirst(fullChildId, PATH_SEPARATOR);
fullChildId = Strings.afterFirst(fullChildId, PATH_SEPARATOR);