diff options
| author | Tomas Bzatek <tbzatek@users.sourceforge.net> | 2009-10-25 18:11:35 +0100 |
|---|---|---|
| committer | Tomas Bzatek <tbzatek@users.sourceforge.net> | 2009-10-25 18:11:35 +0100 |
| commit | 4aba4d7597005af1efa12f420e01d5f938ad60d8 (patch) | |
| tree | 1fbfbffb402f18e54883bddb31780b9581ad5d0d /UCoreUtils.pas | |
| parent | 53c1df30e07af532133db05ee0254f9c1dae66f7 (diff) | |
| download | tuxcmd-0.6.69.tar.xz | |
Clean VFS API up a littlev0.6.69
Strictly split archiving and networking mode, get rid of prefixes
Diffstat (limited to 'UCoreUtils.pas')
| -rw-r--r-- | UCoreUtils.pas | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/UCoreUtils.pas b/UCoreUtils.pas index 02cb4e5..c7d7911 100644 --- a/UCoreUtils.pas +++ b/UCoreUtils.pas @@ -101,6 +101,7 @@ function URIHidePassword(const SrcURI: string): string; function UnEscapeURI(const Str: string): string; function EscapeURI(const Str: string; const IllegalChars: string): string; function URIRipPassword(var URI: string; const RemovePassword: boolean): string; +function GetURIPrefix(const URI: string): string; function StrTotimetDef(const S: string; const Default: time_t): time_t; @@ -1130,6 +1131,13 @@ begin if RemovePassword then Delete(URI, PasswordStart, LoginEnd - PasswordStart); end; +function GetURIPrefix(const URI: string): string; +begin + if Pos('://', URI) > 0 + then Result := Copy(URI, 1, Pos('://', URI) + 2) + else Result := ''; +end; + (********************************************************************************************************************************) procedure DebugMsg(Params: array of const); var |
