io.github.fvarrui.javapackager.utils.StringUtils Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of javapackager Show documentation
Show all versions of javapackager Show documentation
Hybrid Maven/Gradle plugin to package Java applications as native Windows, Mac OS X or GNU/Linux executables and create installers for them
The newest version!
package io.github.fvarrui.javapackager.utils;
import java.util.regex.Matcher;
import java.util.regex.Pattern;
public class StringUtils {
public static String dosToUnix(String input) {
return input.replaceAll("\\r\\n", "\n").replaceAll("\\r", "\n");
}
public static String find(String pattern, String data) {
Pattern r = Pattern.compile(pattern);
Matcher matcher = r.matcher(data);
matcher.find();
return matcher.group();
}
}