Here you can find the source of sanitizePackageVersion(String string)
Parameter | Description |
---|---|
string | The string which might contain underscores |
public static String sanitizePackageVersion(String string)
//package com.java2s; /*/*from w w w. jav a2s .c o m*/ * Maven Packaging Plugin, * Maven plugin to package a Project (deb, ipk, izpack) * Copyright (C) 2000-2008 tarent GmbH * * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public License,version 2 * as published by the Free Software Foundation. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA * 02110-1301, USA. * * tarent GmbH., hereby disclaims all copyright * interest in the program 'Maven Packaging Plugin' * Signature of Elmar Geese, 11 March 2008 * Elmar Geese, CEO tarent GmbH. */ public class Main { /** * Makes a valid and useful package version string from one that cannot be * used or is unsuitable. * * <p> * At the moment the method removes underscores only. * </p> * * @param string * The string which might contain underscores * @return The given string without underscores */ public static String sanitizePackageVersion(String string) { return string.replaceAll("_", ""); } }