Example usage for java.lang String substring

List of usage examples for java.lang String substring

Introduction

In this page you can find the example usage for java.lang String substring.

Prototype

public String substring(int beginIndex) 

Source Link

Document

Returns a string that is a substring of this string.

Usage

From source file:Main.java

public static String getIdForCacheKey(String cacheKey) {
    return cacheKey.substring(cacheKey.indexOf('_') + 1);
}

From source file:Main.java

private static String getFileExtension(String fileName) {
    return fileName.substring(fileName.lastIndexOf(".") + 1);
}

From source file:Main.java

private static String getFileName(String localPath) {
    return localPath.substring(localPath.lastIndexOf("/") + 1);
}

From source file:Main.java

public static String getFileExtension(String filename) {
    return filename.substring(filename.lastIndexOf(".") + 1).toUpperCase();
}

From source file:Main.java

private static String getFieldName(String glueField) {
    return glueField.substring(glueField.lastIndexOf(".") + 1);
}

From source file:Main.java

public static String getFileExtensionWithoutDot(String file) {
    return file.substring(file.lastIndexOf(".") + 1);
}

From source file:Main.java

public static String getAssetName(String filePath) {
    return filePath.substring(ASSET_PREFIX.length());
}

From source file:Main.java

public static String stripPackageFromClassName(String className) {
    return className.substring(className.lastIndexOf(".") + 1);
}

From source file:Main.java

public static String getAddressFromNameAddress(String nameAddress) {
    return nameAddress.substring(nameAddress.indexOf(" ") + 1);
}

From source file:Main.java

static public String getClassNameOnly(String clsName) {
    return clsName.substring(clsName.lastIndexOf(".") + 1);
}