Java String Sanitize sanitize(String value)

Here you can find the source of sanitize(String value)

Description

Remove non-alphabetic characters from a string

License

Open Source License

Parameter

Parameter Description
value a parameter

Return

String

Declaration

public static String sanitize(String value) 

Method Source Code

//package com.java2s;
//License from project: Open Source License 

public class Main {
    /**//from   w w w  .j  ava  2s  . com
     * Remove non-alphabetic characters from a string
     * @param value
     * @return String
     */
    public static String sanitize(String value) {
        return value.toLowerCase().replaceAll("[^a-zA-Z]", "");
    }
}

Related

  1. sanitize(String string)
  2. sanitize(String string, boolean allowWhitespace)
  3. sanitize(String string, String spaceReplace)
  4. sanitize(String text)
  5. sanitize(String text)
  6. sanitizeAppAlias(String appAlias)
  7. sanitizeAttribute(String value)
  8. sanitizeBranchName(String currentBranch)
  9. sanitizeBrowserName(String browserName)