因此,一般来说,子字符串的设置类似于:
s.substring(beginIndex, EndIndex);
是否可以将其切换为:
s.substring(EndIndex, BeginIndex);
谢谢!
最佳答案
您可以包装类和方法:
public class StringInMyWorld {
private final String horribleString;
// + constructor, getter
public String iDoNothingLikeEverybodyElse(int endIndex,
int beginIndex) {
return horribleString.substring(beginIndex, endIndex);
}
}
关于java - 是否可以反转子字符串的起点和终点?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/26128835/