summaryrefslogtreecommitdiff
path: root/UCoreUtils.pas
diff options
context:
space:
mode:
Diffstat (limited to 'UCoreUtils.pas')
-rw-r--r--UCoreUtils.pas8
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