Tabnine Logo
StringUtils.hasTrailingSlash
Code IndexAdd Tabnine to your IDE (free)

How to use
hasTrailingSlash
method
in
com.ocpsoft.pretty.faces.util.StringUtils

Best Java code snippets using com.ocpsoft.pretty.faces.util.StringUtils.hasTrailingSlash (Showing top 4 results out of 315)

origin: ocpsoft/prettyfaces

/**
* Create a URL object for the given url String. The input string must not yet have been decoded.
* 
* @param url The raw, un-decoded url String
*/
public URL(String url)
{
 if (url != null)
 {
   url =url.trim();
   originalURL = url;
   if (StringUtils.hasLeadingSlash(url))
   {
    metadata.setLeadingSlash(true);
    url = url.substring(1);
   }
   if (StringUtils.hasTrailingSlash(url))
   {
    metadata.setTrailingSlash(true);
    url = url.substring(0, url.length() - 1);
   }
   this.segments = Arrays.asList(StringUtils.splitBySlash(url));
 }
 else
 {
   throw new IllegalArgumentException("URL cannot be null.");
 }
}
origin: ocpsoft/rewrite

/**
* Create a URL object for the given url String. The input string must not yet have been decoded.
* 
* @param url The raw, un-decoded url String
*/
public URL(String url)
{
 if (url != null)
 {
   url = url.trim();
   originalURL = url;
   if (StringUtils.hasLeadingSlash(url))
   {
    metadata.setLeadingSlash(true);
    url = url.substring(1);
   }
   if (StringUtils.hasTrailingSlash(url))
   {
    metadata.setTrailingSlash(true);
    url = url.substring(0, url.length() - 1);
   }
   this.segments = Arrays.asList(StringUtils.splitBySlash(url));
 }
 else
 {
   throw new IllegalArgumentException("URL cannot be null.");
 }
}
origin: com.ocpsoft/prettyfaces-jsf2

/**
* Create a URL object for the given url String. The input string must not yet have been decoded.
* 
* @param url The raw, un-decoded url String
*/
public URL(String url)
{
 if (url != null)
 {
   url =url.trim();
   originalURL = url;
   if (StringUtils.hasLeadingSlash(url))
   {
    metadata.setLeadingSlash(true);
    url = url.substring(1);
   }
   if (StringUtils.hasTrailingSlash(url))
   {
    metadata.setTrailingSlash(true);
    url = url.substring(0, url.length() - 1);
   }
   this.segments = Arrays.asList(StringUtils.splitBySlash(url));
 }
 else
 {
   throw new IllegalArgumentException("URL cannot be null.");
 }
}
origin: ocpsoft/prettyfaces

/**
* Create a URL object for the given url String. The input string must not yet have been decoded.
* 
* @param url The raw, un-decoded url String
*/
public URL(String url)
{
 if (url != null)
 {
   url =url.trim();
   originalURL = url;
   if (StringUtils.hasLeadingSlash(url))
   {
    metadata.setLeadingSlash(true);
    url = url.substring(1);
   }
   if (StringUtils.hasTrailingSlash(url))
   {
    metadata.setTrailingSlash(true);
    url = url.substring(0, url.length() - 1);
   }
   this.segments = Arrays.asList(StringUtils.splitBySlash(url));
 }
 else
 {
   throw new IllegalArgumentException("URL cannot be null.");
 }
}
com.ocpsoft.pretty.faces.utilStringUtilshasTrailingSlash

Popular methods of StringUtils

  • countSlashes
  • hasLeadingSlash
  • isBlank
  • isNotBlank
  • splitBySlash

Popular in Java

  • Making http post requests using okhttp
  • getOriginalFilename (MultipartFile)
    Return the original filename in the client's filesystem.This may contain path information depending
  • notifyDataSetChanged (ArrayAdapter)
  • scheduleAtFixedRate (ScheduledExecutorService)
  • OutputStream (java.io)
    A writable sink for bytes.Most clients will use output streams that write data to the file system (
  • ResultSet (java.sql)
    An interface for an object which represents a database table entry, returned as the result of the qu
  • SQLException (java.sql)
    An exception that indicates a failed JDBC operation. It provides the following information about pro
  • ThreadPoolExecutor (java.util.concurrent)
    An ExecutorService that executes each submitted task using one of possibly several pooled threads, n
  • Modifier (javassist)
    The Modifier class provides static methods and constants to decode class and member access modifiers
  • JComboBox (javax.swing)
  • Top PhpStorm plugins
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogTabnine AcademyTerms of usePrivacy policyJava Code IndexJavascript Code Index
Get Tabnine for your IDE now