All Downloads are FREE. Search and download functionalities are using the official Maven repository.

io.github.fvarrui.javapackager.utils.StringUtils Maven / Gradle / Ivy

Go to download

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();
	}

}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy