/** * 将字符串按高低位的逻辑翻转 * * @param data 要翻转的字符串 * @return String 翻转的结果 * @author WuQian * @date 2020/3/13 13:18 */
* 将字符串按高低位的逻辑翻转
*
* @param data 要翻转的字符串
* @return String 翻转的结果
* @author WuQian
* @date 2020/3/13 13:18
*/
public static String highAndLowInversion(String data){
String regex="\w{2}";
Pattern pattern = Pattern.compile(regex);
Matcher matcher = pattern.matcher(data);
StringBuilder result = new StringBuilder();
while (matcher.find()) {
result.insert(0, matcher.group());
}
return result.toString();
}这里写自定义目录标题)