📜  java string remove character - Java 代码示例

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

代码示例4
// 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"