github / src / com / mizo0203 / timeline / talker / util / DisplayNameUtil.java @ master
1 |
package com.mizo0203.timeline.talker.util; |
---|---|
2 |
|
3 |
import org.jetbrains.annotations.NotNull; |
4 |
|
5 |
import java.util.regex.Matcher; |
6 |
import java.util.regex.Pattern; |
7 |
|
8 |
public class DisplayNameUtil { |
9 |
|
10 |
public static String removeContext(@NotNull String name) { |
11 |
Pattern p = Pattern.compile("([^@@]+).+"); |
12 |
Matcher m = p.matcher(name); |
13 |
return m.replaceFirst("$1"); |
14 |
}
|
15 |
}
|