/** * Gets the substring after the last occurrence given char. * * @param c * char to scan for * @return the substring */ public final String afterLast(final char c) { return Strings.afterLast(text, c); }
/** * Gets the substring after the last occurrence given char. * * @param c * char to scan for * @return the substring */ public final String afterLast(final char c) { return Strings.afterLast(text, c); }
/** * Gets the substring before the last occurrence given char. * * @param c * char to scan for * @return the substring */ public final String beforeLast(final char c) { return Strings.afterLast(text, c); }
/** * Gets the substring after the last occurrence given char. * * @param c * char to scan for * @return the substring */ public final String afterLast(final char c) { return Strings.afterLast(text, c); }
/** * Gets the substring before the last occurrence given char. * * @param c * char to scan for * @return the substring */ public final String beforeLast(final char c) { return Strings.afterLast(text, c); }
/** * Gets the substring before the last occurrence given char. * * @param c * char to scan for * @return the substring */ public final String beforeLast(final char c) { return Strings.afterLast(text, c); }
private ResourceNameIterator newResourceNameIterator(String path, String style, Locale locale, String extension) { final String realPath; final String realExtension; if ((extension == null) && (path != null) && (path.indexOf('.') != -1)) { realPath = Strings.beforeLast(path, '.'); // for extensions with separator take the first extension realExtension = Strings.afterLast(path, '.'); if (realExtension.indexOf(',') > -1) { // multiple extensions are not allowed in the path parameter return new EmptyResourceNameIterator(); } } else { realPath = path; realExtension = extension; } return new ResourceNameIterator(realPath, style, locale, realExtension); }
String[] extns = Strings.split(Strings.afterLast(path, '.'), ','); this.extensions = Arrays.asList(extns); this.path = Strings.beforeLast(path, '.');
String[] extns = Strings.split(Strings.afterLast(path, '.'), ','); this.extensions = Arrays.asList(extns); this.path = Strings.beforeLast(path, '.');
if ((extensions == null) && (path.indexOf('.') != -1)) this.extensions = Strings.afterLast(path, '.'); path = Strings.beforeLast(path, '.');
/** * Construct. * * @param path * The path of the resource without extension * @param style * A theme or style (see {@link org.apache.wicket.Session}) * @param locale * The Locale to apply * @param extensions * the filname's extensions (comma separated) */ public ResourceNameIterator(String path, final String style, final Locale locale, final String extensions) { this.locale = locale; if (extensions == null) { this.extensions = Strings.afterLast(path, '.'); path = Strings.beforeLast(path, '.'); } else { this.extensions = extensions; } this.styleIterator = new StyleAndVariationResourceNameIterator(path, style, null); }
@Override protected void onInitialize() { super.onInitialize(); BookmarkablePageLink<Void> link = new BookmarkablePageLink<Void>("sources", SourcesPage.class, SourcesPage.generatePageParameters(this)); add(link); PopupSettings settings = new PopupSettings("sources", PopupSettings.RESIZABLE); settings.setWidth(800); settings.setHeight(600); link.setPopupSettings(settings); final String packageName = getClass().getPackage().getName(); add(new Label("mainNavigation", Strings.afterLast(packageName, '.'))); } }
String realExtension = Strings.afterLast(path, '.'); if (realExtension.indexOf(',') > -1)
String realExtension = Strings.afterLast(path, '.'); if (realExtension.indexOf(',') > -1)