string
New in version 1.1.0.
String parsing, formatting, etc.
-
smisk.util.string.normalize_url(url, ref_base_url=None)
Parameters: |
- url (URL | string) – An absolute URL, absolute path or relative path.
- ref_base_url (URL) – Default absolute URL used to expand a path to a full URL.
Uses smisk.core.request.url if not set.
|
Return type: | URL
|
- Parse a qvalue HTTP header
-
smisk.util.string.strip_filename_extension(fn)
Remove any file extension from filename.
-
smisk.util.string.tokenize_path(path)
Deconstruct a URI path into standardized tokens.
Parameters: |
- path (string) – A pathname
|
Return type: | list
|