Java String Sanitize sanitizeIDs(String str)

Here you can find the source of sanitizeIDs(String str)

Description

Replace last "|" in pageIDs

License

Apache License

Parameter

Parameter Description
str a parameter

Declaration

public static String sanitizeIDs(String str) 

Method Source Code

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

public class Main {
    /**//  w  ww  . java 2  s.c om
     * Replace last "|" in pageIDs
     *
     * @param str
     * @return
     */
    public static String sanitizeIDs(String str) {
        if (str != null && str.length() > 0 && str.charAt(str.length() - 1) == '|') {
            str = str.substring(0, str.length() - 1);
        }
        return str;
    }
}

Related

  1. sanitizeGoogleId(String rawGoogleId)
  2. sanitizeHeader(String header)
  3. sanitizeID(String name)
  4. sanitizeIdentifier(String identifier)
  5. sanitizeIdentifierName(String input)
  6. sanitizeInput(String input)
  7. sanitizeInput(String string)
  8. sanitizeJavascript(String originalString)
  9. sanitizeLine(String line)