Java ID Value Create toId(String text)

Here you can find the source of toId(String text)

Description

to Id

License

Apache License

Declaration

public static String toId(String text) 

Method Source Code

//package com.java2s;
//License from project: Apache License 

public class Main {
    public static String toId(String text) {
        return text.replaceAll("[^a-zA-Z0-9\\-_]*", "");
    }//from w  ww.  j a va 2 s .  c o  m
}

Related

  1. generateUniqueIdentity()
  2. generateUniqueName(String kind)
  3. generateUniqueString(int maxLength)
  4. toId(String id)
  5. toId(String name)
  6. toIdableName(String xpath)
  7. toIdentifier(String input)
  8. toIdentifier(String name)
  9. toIdentifier(String name, StringBuffer fieldName)