We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 4ed3530 commit 7b50c5eCopy full SHA for 7b50c5e
1 file changed
util-lib/src/main/java/com/moioio/util/FileUtil.java
@@ -190,6 +190,28 @@ public static String getSuffix(String path) {
190
return path;
191
}
192
193
+// public static void main(String[] args)
194
+// {
195
+// MyLog.debug(getSuffix("E:\\tme\\album\\279085261\\5.wav"));
196
+// }
197
+
198
+ public static String getNameWithoutSuffix(String path) {
199
200
+ String name = new File(path).getName();
201
+ int lastIndexOf = name.lastIndexOf(".");
202
+ if(lastIndexOf!=-1)
203
+ {
204
+ name = name.substring(0,lastIndexOf);
205
+ return name;
206
+ }
207
+ else
208
209
210
211
212
213
214
215
public static String getSuffixFromUrl(String url)
216
{
217
if (!StringUtil.isNull(url))
0 commit comments