标签:pre lse boolean str return ast string dex indexof
public String getParentPath(final String originalPath) { boolean isSplitRequired = true; int lastSlashIndex = originalPath.lastIndexOf("/"); if (lastSlashIndex == -1 && lastSlashIndex == 0) { isSplitRequired = false; } return isSplitRequired ? originalPath.substring(0,lastSlashIndex) : originalPath; }
标签:pre lse boolean str return ast string dex indexof
原文地址:https://www.cnblogs.com/wenlin-gk/p/9858688.html