📜  删除字符串的结尾部分 java Code Example

📅  最后修改于: 2022-03-11 14:52:35.344000             🧑  作者: Mango

代码示例2
// Works only if you have a certain character at which you want to cut
String text = "Image.png";

String[] cutText = text.split("\\.");

// cutText[0] has value "Image"
// cutText[1] has value "png"