Subversion Repositories oidplus

Rev

Rev 749 | Go to most recent revision | Show entire file | Regard whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 749 Rev 750
Line 1... Line 1...
1
unit VTSFUNCS;
1
unit VTSFUNCS;
2
 
2
 
3
(************************************************)
3
(************************************************)
4
(* VTSFUNCS.PAS                                 *)
4
(* VTSFUNCS.PAS                                 *)
5
(* Author:   Daniel Marschall                   *)
5
(* Author:   Daniel Marschall                   *)
6
(* Revision: 2022-02-20                         *)
6
(* Revision: 2022-02-22                         *)
7
(* License:  Apache 2.0                         *)
7
(* License:  Apache 2.0                         *)
8
(* This file contains:                          *)
8
(* This file contains:                          *)
9
(* - Various functions                          *)
9
(* - Various functions                          *)
10
(************************************************)
10
(************************************************)
11
 
11
 
Line 37... Line 37...
37
 
37
 
38
function StringReplace(s, search, replace: string): string;
38
function StringReplace(s, search, replace: string): string;
39
 
39
 
40
function LastCharPos(const S: string; const Chr: char): integer;
40
function LastCharPos(const S: string; const Chr: char): integer;
41
function LowerCase(s: string): string;
41
function LowerCase(s: string): string;
-
 
42
function UpperCase(s: string): string;
42
function base_convert_bigint(numstring: string; frombase, tobase: integer): string;
43
function base_convert_bigint(numstring: string; frombase, tobase: integer): string;
43
 
44
 
44
implementation
45
implementation
45
 
46
 
46
uses
47
uses
Line 334... Line 335...
334
    end;
335
    end;
335
  end;
336
  end;
336
  LowerCase := res;
337
  LowerCase := res;
337
end;
338
end;
338
 
339
 
-
 
340
function UpperCase(s: string): string;
-
 
341
var
-
 
342
  res: string;
-
 
343
  i: integer;
-
 
344
begin
-
 
345
  res := '';
-
 
346
  for i := 1 to Length(s) do
-
 
347
  begin
-
 
348
    if s[i] in ['a'..'z'] then
-
 
349
    begin
-
 
350
      res := res + Chr(Ord('A')+(Ord(s[i])-Ord('a')));
-
 
351
    end
-
 
352
    else
-
 
353
    begin
-
 
354
      res := res + s[i];
-
 
355
    end;
-
 
356
  end;
-
 
357
  UpperCase := res;
-
 
358
end;
-
 
359
 
339
function base_convert_bigint(numstring: string; frombase, tobase: integer): string;
360
function base_convert_bigint(numstring: string; frombase, tobase: integer): string;
340
var
361
var
341
  i: Integer;
362
  i: Integer;
342
  frombase_str: string;
363
  frombase_str: string;
343
  tobase_str: string;
364
  tobase_str: string;