#include <src/main/decaf/internal/net/URLUtils.h>
Returns a path that can be safely concatenated with the given authority.
If the authority is empty, this can be any path. Otherwise the paths run together like http://activemq.apache.html.
- Parameters
-
authority | The authority value from a given URL. |
path | The path value from a given URL. |
- Returns
- a safe version of the Path value.
Returns the path will relative path segments like ".." and "." resolved.
The returned path will not necessarily start with a "/" character. This handles ".." and "." segments at both the beginning and end of the path.
- Parameters
-
discardRelativePrefix | true to remove leading ".." segments from the path. This is appropriate for paths that are known to be absolute. |
- Returns
- the canonicalized Path value.
Returns the index of the first char of the given set in the passed in String bounded between start and end.
This returns the end value if none of the characters exist in the requested range.
This is an optimization used in URL processing as the return value is end if the chars are not found in the string so that processing can continue from the returned end value no matter what the result is.
- Parameters
-
string | The string to search. |
chars | The set of characters to search for in the target String. |
start | The start index to search from. |
end | The end index to stop the search at. |
- Returns
- the first index that matches one of the chars or the end value if no matches..
File based URL instance with an empty host value are always considered to have a host value of "localhost".
- Parameters
-
url | the URL whose host value is to be returned. |
- Returns
- the host value or 'localhost' for file based protocols.
Returns the scheme prefix like "http" from the URL spec, or empty if the spec doesn't start with a scheme.
Scheme prefixes match this pattern: (alpha ( alpha | digit | '+' | '-' | '.' )* ':')
static bool decaf::internal::net::URLUtils::isValidSchemeChar |
( |
int |
index, |
|
|
char |
c |
|
) |
| |
|
static |
Returns true if the given char is valid for a URL scheme taking into account its position in the scheme string.
- Parameters
-
index | The index in the scheme where the char value is from. |
c | The value from the given index. |
- Returns
- true if the char value is valid for the given index.
The documentation for this class was generated from the following file: