Java String Quote quoteLocation(String location)

Here you can find the source of quoteLocation(String location)

Description

quote Location

License

Apache License

Declaration

protected static String quoteLocation(String location) 

Method Source Code

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

public class Main {
    protected static String quoteLocation(String location) {
        if (location == null) {
            return null;
        }/*www  .  ja  v  a2  s  . c  om*/
        if (!location.startsWith("\"")) {
            location = "\"" + location;
        }
        if (!location.endsWith("\"")) {
            location = location + "\"";
        }
        return location;
    }
}

Related

  1. quoteJavascriptString(String s)
  2. quoteJavaString(String s)
  3. quoteJavaString(String s)
  4. quoteJsonLib(String string)
  5. quoteLiteralAsRegexp(String text)
  6. quoteMdxIdentifier(String ident)
  7. quoteMe(String unquoted)
  8. quoteMeta(String s)
  9. quotemeta(String s)