Java String Starts Wtih startsWithSlash(String url)

Here you can find the source of startsWithSlash(String url)

Description

starts With Slash

License

Open Source License

Declaration

public static String startsWithSlash(String url) 

Method Source Code

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

public class Main {
    public static String startsWithSlash(String url) {
        return url.startsWith("/") ? url : "/" + url;
    }/*  ww w .j a v a 2  s . c  o  m*/
}

Related

  1. startsWithPrefix(String inputText, String[] prefixes)
  2. startsWithQuote(String str)
  3. startsWithSeparator(String str)
  4. startsWithSeveralUpperCaseLetters(String string)
  5. startsWithSlash(String path)
  6. startsWithSpace(String s)
  7. startsWithSpaces(final String text)
  8. startsWithTag(String html, int position)
  9. startsWithUppercase(String str)