Java String Sanitize sanitizeCompletion(String replace)

Here you can find the source of sanitizeCompletion(String replace)

Description

sanitize Completion

License

Open Source License

Declaration

public static String sanitizeCompletion(String replace) 

Method Source Code

//package com.java2s;
/*******************************************************************************
 * Copyright (c) 2017 Red Hat Inc. and others.
 * All rights reserved. This program and the accompanying materials
 * are made available under the terms of the Eclipse Public License v1.0
 * which accompanies this distribution, and is available at
 * http://www.eclipse.org/legal/epl-v10.html
 *
 * Contributors:/*from   ww  w . j  a  v a 2 s.  com*/
 *     Red Hat Inc. - initial API and implementation
 *******************************************************************************/

public class Main {
    private static final String ESCAPE_DOLLAR = "\\\\\\$";
    private static final String DOLLAR = "\\$";

    public static String sanitizeCompletion(String replace) {
        return replace == null ? null : replace.replaceAll(DOLLAR, ESCAPE_DOLLAR);
    }
}

Related

  1. sanitizeBrowserName(String browserName)
  2. sanitizeChatMessage(String message)
  3. sanitizeClassname(String classname)
  4. sanitizeClassName(String s)
  5. sanitizeColumn(String colName, String relationName)
  6. sanitizeDescription(String description)
  7. sanitizeDir(String name)
  8. sanitizeFolderName(String s)
  9. sanitizeForCmisName(String in)