{***************************************************************************}
{ This source code was generated automatically by                           }
{ Pas file import tool for Scripter Studio (Pro)                            }
{                                                                           }
{ Scripter Studio and Pas file import tool for Scripter Studio              }
{ written by TMS Software                                                   }
{            copyright © 1997 - 2010                                        }
{            Email : info@tmssoftware.com                                   }
{            Web : http://www.tmssoftware.com                               }
{***************************************************************************}
unit ap_StrUtils;

interface

uses
  SysUtils,
  Types,
  StrUtils,
  Variants,
  atScript;

{$WARNINGS OFF}

type
  TatStrUtilsLibrary = class(TatScripterLibrary)
    procedure __ResemblesText(AMachine: TatVirtualMachine);
    procedure __AnsiResemblesText(AMachine: TatVirtualMachine);
    procedure __ContainsText(AMachine: TatVirtualMachine);
    procedure __AnsiContainsText(AMachine: TatVirtualMachine);
    procedure __StartsText(AMachine: TatVirtualMachine);
    procedure __AnsiStartsText(AMachine: TatVirtualMachine);
    procedure __EndsText(AMachine: TatVirtualMachine);
    procedure __AnsiEndsText(AMachine: TatVirtualMachine);
    procedure __ReplaceText(AMachine: TatVirtualMachine);
    procedure __AnsiReplaceText(AMachine: TatVirtualMachine);
    procedure __ContainsStr(AMachine: TatVirtualMachine);
    procedure __AnsiContainsStr(AMachine: TatVirtualMachine);
    procedure __StartsStr(AMachine: TatVirtualMachine);
    procedure __AnsiStartsStr(AMachine: TatVirtualMachine);
    procedure __EndsStr(AMachine: TatVirtualMachine);
    procedure __AnsiEndsStr(AMachine: TatVirtualMachine);
    procedure __ReplaceStr(AMachine: TatVirtualMachine);
    procedure __AnsiReplaceStr(AMachine: TatVirtualMachine);
    procedure __DupeString(AMachine: TatVirtualMachine);
    procedure __ReverseString(AMachine: TatVirtualMachine);
    procedure __AnsiReverseString(AMachine: TatVirtualMachine);
    procedure __StuffString(AMachine: TatVirtualMachine);
    procedure __IfThen(AMachine: TatVirtualMachine);
    procedure __LeftStr(AMachine: TatVirtualMachine);
    procedure __RightStr(AMachine: TatVirtualMachine);
    procedure __MidStr(AMachine: TatVirtualMachine);
    procedure __LeftBStr(AMachine: TatVirtualMachine);
    procedure __RightBStr(AMachine: TatVirtualMachine);
    procedure __MidBStr(AMachine: TatVirtualMachine);
    procedure __AnsiLeftStr(AMachine: TatVirtualMachine);
    procedure __AnsiRightStr(AMachine: TatVirtualMachine);
    procedure __AnsiMidStr(AMachine: TatVirtualMachine);
    procedure __SearchBuf(AMachine: TatVirtualMachine);
    procedure __PosEx(AMachine: TatVirtualMachine);
    procedure __Soundex(AMachine: TatVirtualMachine);
    procedure __SoundexInt(AMachine: TatVirtualMachine);
    procedure __DecodeSoundexInt(AMachine: TatVirtualMachine);
    procedure __SoundexWord(AMachine: TatVirtualMachine);
    procedure __DecodeSoundexWord(AMachine: TatVirtualMachine);
    procedure __SoundexSimilar(AMachine: TatVirtualMachine);
    procedure __SoundexCompare(AMachine: TatVirtualMachine);
    procedure __SoundexProc(AMachine: TatVirtualMachine);
    procedure __GetWordDelimiters(AMachine: TatVirtualMachine);
    procedure Init; override;
    class function LibraryName: string; override;
  end;




implementation



procedure TatStrUtilsLibrary.__ResemblesText(AMachine: TatVirtualMachine);
  var
  AResult: variant;
begin
  with AMachine do
  begin
AResult := StrUtils.ResemblesText(VarToStr(GetInputArg(0)),VarToStr(GetInputArg(1)));
    ReturnOutputArg(AResult);
  end;
end;

procedure TatStrUtilsLibrary.__AnsiResemblesText(AMachine: TatVirtualMachine);
  var
  AResult: variant;
begin
  with AMachine do
  begin
AResult := StrUtils.AnsiResemblesText(VarToStr(GetInputArg(0)),VarToStr(GetInputArg(1)));
    ReturnOutputArg(AResult);
  end;
end;

procedure TatStrUtilsLibrary.__ContainsText(AMachine: TatVirtualMachine);
  var
  AResult: variant;
begin
  with AMachine do
  begin
AResult := StrUtils.ContainsText(VarToStr(GetInputArg(0)),VarToStr(GetInputArg(1)));
    ReturnOutputArg(AResult);
  end;
end;

procedure TatStrUtilsLibrary.__AnsiContainsText(AMachine: TatVirtualMachine);
  var
  AResult: variant;
begin
  with AMachine do
  begin
AResult := StrUtils.AnsiContainsText(VarToStr(GetInputArg(0)),VarToStr(GetInputArg(1)));
    ReturnOutputArg(AResult);
  end;
end;

procedure TatStrUtilsLibrary.__StartsText(AMachine: TatVirtualMachine);
  var
  AResult: variant;
begin
  with AMachine do
  begin
AResult := StrUtils.StartsText(VarToStr(GetInputArg(0)),VarToStr(GetInputArg(1)));
    ReturnOutputArg(AResult);
  end;
end;

procedure TatStrUtilsLibrary.__AnsiStartsText(AMachine: TatVirtualMachine);
  var
  AResult: variant;
begin
  with AMachine do
  begin
AResult := StrUtils.AnsiStartsText(VarToStr(GetInputArg(0)),VarToStr(GetInputArg(1)));
    ReturnOutputArg(AResult);
  end;
end;

procedure TatStrUtilsLibrary.__EndsText(AMachine: TatVirtualMachine);
  var
  AResult: variant;
begin
  with AMachine do
  begin
AResult := StrUtils.EndsText(VarToStr(GetInputArg(0)),VarToStr(GetInputArg(1)));
    ReturnOutputArg(AResult);
  end;
end;

procedure TatStrUtilsLibrary.__AnsiEndsText(AMachine: TatVirtualMachine);
  var
  AResult: variant;
begin
  with AMachine do
  begin
AResult := StrUtils.AnsiEndsText(VarToStr(GetInputArg(0)),VarToStr(GetInputArg(1)));
    ReturnOutputArg(AResult);
  end;
end;

procedure TatStrUtilsLibrary.__ReplaceText(AMachine: TatVirtualMachine);
  var
  AResult: variant;
begin
  with AMachine do
  begin
AResult := string(StrUtils.ReplaceText(VarToStr(GetInputArg(0)),VarToStr(GetInputArg(1)),VarToStr(GetInputArg(2))));
    ReturnOutputArg(AResult);
  end;
end;

procedure TatStrUtilsLibrary.__AnsiReplaceText(AMachine: TatVirtualMachine);
  var
  AResult: variant;
begin
  with AMachine do
  begin
AResult := string(StrUtils.AnsiReplaceText(VarToStr(GetInputArg(0)),VarToStr(GetInputArg(1)),VarToStr(GetInputArg(2))));
    ReturnOutputArg(AResult);
  end;
end;

procedure TatStrUtilsLibrary.__ContainsStr(AMachine: TatVirtualMachine);
  var
  AResult: variant;
begin
  with AMachine do
  begin
AResult := StrUtils.ContainsStr(VarToStr(GetInputArg(0)),VarToStr(GetInputArg(1)));
    ReturnOutputArg(AResult);
  end;
end;

procedure TatStrUtilsLibrary.__AnsiContainsStr(AMachine: TatVirtualMachine);
  var
  AResult: variant;
begin
  with AMachine do
  begin
AResult := StrUtils.AnsiContainsStr(VarToStr(GetInputArg(0)),VarToStr(GetInputArg(1)));
    ReturnOutputArg(AResult);
  end;
end;

procedure TatStrUtilsLibrary.__StartsStr(AMachine: TatVirtualMachine);
  var
  AResult: variant;
begin
  with AMachine do
  begin
AResult := StrUtils.StartsStr(VarToStr(GetInputArg(0)),VarToStr(GetInputArg(1)));
    ReturnOutputArg(AResult);
  end;
end;

procedure TatStrUtilsLibrary.__AnsiStartsStr(AMachine: TatVirtualMachine);
  var
  AResult: variant;
begin
  with AMachine do
  begin
AResult := StrUtils.AnsiStartsStr(VarToStr(GetInputArg(0)),VarToStr(GetInputArg(1)));
    ReturnOutputArg(AResult);
  end;
end;

procedure TatStrUtilsLibrary.__EndsStr(AMachine: TatVirtualMachine);
  var
  AResult: variant;
begin
  with AMachine do
  begin
AResult := StrUtils.EndsStr(VarToStr(GetInputArg(0)),VarToStr(GetInputArg(1)));
    ReturnOutputArg(AResult);
  end;
end;

procedure TatStrUtilsLibrary.__AnsiEndsStr(AMachine: TatVirtualMachine);
  var
  AResult: variant;
begin
  with AMachine do
  begin
AResult := StrUtils.AnsiEndsStr(VarToStr(GetInputArg(0)),VarToStr(GetInputArg(1)));
    ReturnOutputArg(AResult);
  end;
end;

procedure TatStrUtilsLibrary.__ReplaceStr(AMachine: TatVirtualMachine);
  var
  AResult: variant;
begin
  with AMachine do
  begin
AResult := string(StrUtils.ReplaceStr(VarToStr(GetInputArg(0)),VarToStr(GetInputArg(1)),VarToStr(GetInputArg(2))));
    ReturnOutputArg(AResult);
  end;
end;

procedure TatStrUtilsLibrary.__AnsiReplaceStr(AMachine: TatVirtualMachine);
  var
  AResult: variant;
begin
  with AMachine do
  begin
AResult := string(StrUtils.AnsiReplaceStr(VarToStr(GetInputArg(0)),VarToStr(GetInputArg(1)),VarToStr(GetInputArg(2))));
    ReturnOutputArg(AResult);
  end;
end;

procedure TatStrUtilsLibrary.__DupeString(AMachine: TatVirtualMachine);
  var
  AResult: variant;
begin
  with AMachine do
  begin
AResult := string(StrUtils.DupeString(VarToStr(GetInputArg(0)),VarToInteger(GetInputArg(1))));
    ReturnOutputArg(AResult);
  end;
end;

procedure TatStrUtilsLibrary.__ReverseString(AMachine: TatVirtualMachine);
  var
  AResult: variant;
begin
  with AMachine do
  begin
AResult := string(StrUtils.ReverseString(VarToStr(GetInputArg(0))));
    ReturnOutputArg(AResult);
  end;
end;

procedure TatStrUtilsLibrary.__AnsiReverseString(AMachine: TatVirtualMachine);
  var
  AResult: variant;
begin
  with AMachine do
  begin
AResult := string(StrUtils.AnsiReverseString(VarToStr(GetInputArg(0))));
    ReturnOutputArg(AResult);
  end;
end;

procedure TatStrUtilsLibrary.__StuffString(AMachine: TatVirtualMachine);
  var
  AResult: variant;
begin
  with AMachine do
  begin
AResult := string(StrUtils.StuffString(VarToStr(GetInputArg(0)),VarToInteger(GetInputArg(1)),VarToInteger(GetInputArg(2)),VarToStr(GetInputArg(3))));
    ReturnOutputArg(AResult);
  end;
end;

procedure TatStrUtilsLibrary.__IfThen(AMachine: TatVirtualMachine);
  var
  AResult: variant;
begin
  with AMachine do
  begin
case InputArgCount of
2: AResult := string(StrUtils.IfThen(GetInputArg(0),VarToStr(GetInputArg(1))));
3: AResult := string(StrUtils.IfThen(GetInputArg(0),VarToStr(GetInputArg(1)),VarToStr(GetInputArg(2))));
end;
    ReturnOutputArg(AResult);
  end;
end;

procedure TatStrUtilsLibrary.__LeftStr(AMachine: TatVirtualMachine);
  var
  AResult: variant;
begin
  with AMachine do
  begin
AResult := StrUtils.LeftStr(GetInputArg(0),VarToInteger(GetInputArg(1)));
    ReturnOutputArg(AResult);
  end;
end;

procedure TatStrUtilsLibrary.__RightStr(AMachine: TatVirtualMachine);
  var
  AResult: variant;
begin
  with AMachine do
  begin
AResult := StrUtils.RightStr(GetInputArg(0),VarToInteger(GetInputArg(1)));
    ReturnOutputArg(AResult);
  end;
end;

procedure TatStrUtilsLibrary.__MidStr(AMachine: TatVirtualMachine);
  var
  AResult: variant;
begin
  with AMachine do
  begin
AResult := StrUtils.MidStr(GetInputArg(0),VarToInteger(GetInputArg(1)),VarToInteger(GetInputArg(2)));
    ReturnOutputArg(AResult);
  end;
end;

procedure TatStrUtilsLibrary.__LeftBStr(AMachine: TatVirtualMachine);
  var
  AResult: variant;
begin
  with AMachine do
  begin
AResult := StrUtils.LeftBStr(GetInputArg(0),VarToInteger(GetInputArg(1)));
    ReturnOutputArg(AResult);
  end;
end;

procedure TatStrUtilsLibrary.__RightBStr(AMachine: TatVirtualMachine);
  var
  AResult: variant;
begin
  with AMachine do
  begin
AResult := StrUtils.RightBStr(GetInputArg(0),VarToInteger(GetInputArg(1)));
    ReturnOutputArg(AResult);
  end;
end;

procedure TatStrUtilsLibrary.__MidBStr(AMachine: TatVirtualMachine);
  var
  AResult: variant;
begin
  with AMachine do
  begin
AResult := StrUtils.MidBStr(GetInputArg(0),VarToInteger(GetInputArg(1)),VarToInteger(GetInputArg(2)));
    ReturnOutputArg(AResult);
  end;
end;

procedure TatStrUtilsLibrary.__AnsiLeftStr(AMachine: TatVirtualMachine);
  var
  AResult: variant;
begin
  with AMachine do
  begin
AResult := string(StrUtils.AnsiLeftStr(VarToStr(GetInputArg(0)),VarToInteger(GetInputArg(1))));
    ReturnOutputArg(AResult);
  end;
end;

procedure TatStrUtilsLibrary.__AnsiRightStr(AMachine: TatVirtualMachine);
  var
  AResult: variant;
begin
  with AMachine do
  begin
AResult := string(StrUtils.AnsiRightStr(VarToStr(GetInputArg(0)),VarToInteger(GetInputArg(1))));
    ReturnOutputArg(AResult);
  end;
end;

procedure TatStrUtilsLibrary.__AnsiMidStr(AMachine: TatVirtualMachine);
  var
  AResult: variant;
begin
  with AMachine do
  begin
AResult := string(StrUtils.AnsiMidStr(VarToStr(GetInputArg(0)),VarToInteger(GetInputArg(1)),VarToInteger(GetInputArg(2))));
    ReturnOutputArg(AResult);
  end;
end;

procedure TatStrUtilsLibrary.__SearchBuf(AMachine: TatVirtualMachine);
  var
  Param5: TStringSearchOptions;
  AResult: variant;
begin
  with AMachine do
  begin
IntToSet(Param5, VarToInteger(GetInputArg(5)), SizeOf(Param5));
case InputArgCount of
5: AResult := string(StrUtils.SearchBuf(PAnsiChar(AnsiString(VarToStr(GetInputArg(0)))),VarToInteger(GetInputArg(1)),VarToInteger(GetInputArg(2)),VarToInteger(GetInputArg(3)),GetInputArg(4)));
6: AResult := string(StrUtils.SearchBuf(PAnsiChar(AnsiString(VarToStr(GetInputArg(0)))),VarToInteger(GetInputArg(1)),VarToInteger(GetInputArg(2)),VarToInteger(GetInputArg(3)),GetInputArg(4),Param5));
end;
    ReturnOutputArg(AResult);
  end;
end;

procedure TatStrUtilsLibrary.__PosEx(AMachine: TatVirtualMachine);
  var
  AResult: variant;
begin
  with AMachine do
  begin
case InputArgCount of
2: AResult := Integer(StrUtils.PosEx(VarToStr(GetInputArg(0)),VarToStr(GetInputArg(1))));
3: AResult := Integer(StrUtils.PosEx(VarToStr(GetInputArg(0)),VarToStr(GetInputArg(1)),VarToInteger(GetInputArg(2))));
end;
    ReturnOutputArg(AResult);
  end;
end;

procedure TatStrUtilsLibrary.__Soundex(AMachine: TatVirtualMachine);
  var
  AResult: variant;
begin
  with AMachine do
  begin
case InputArgCount of
1: AResult := string(StrUtils.Soundex(VarToStr(GetInputArg(0))));
2: AResult := string(StrUtils.Soundex(VarToStr(GetInputArg(0)),TSoundexLength(VarToInteger(GetInputArg(1)))));
end;
    ReturnOutputArg(AResult);
  end;
end;

procedure TatStrUtilsLibrary.__SoundexInt(AMachine: TatVirtualMachine);
  var
  AResult: variant;
begin
  with AMachine do
  begin
case InputArgCount of
1: AResult := Integer(StrUtils.SoundexInt(VarToStr(GetInputArg(0))));
2: AResult := Integer(StrUtils.SoundexInt(VarToStr(GetInputArg(0)),TSoundexIntLength(VarToInteger(GetInputArg(1)))));
end;
    ReturnOutputArg(AResult);
  end;
end;

procedure TatStrUtilsLibrary.__DecodeSoundexInt(AMachine: TatVirtualMachine);
  var
  AResult: variant;
begin
  with AMachine do
  begin
AResult := string(StrUtils.DecodeSoundexInt(VarToInteger(GetInputArg(0))));
    ReturnOutputArg(AResult);
  end;
end;

procedure TatStrUtilsLibrary.__SoundexWord(AMachine: TatVirtualMachine);
  var
  AResult: variant;
begin
  with AMachine do
  begin
AResult := Integer(StrUtils.SoundexWord(VarToStr(GetInputArg(0))));
    ReturnOutputArg(AResult);
  end;
end;

procedure TatStrUtilsLibrary.__DecodeSoundexWord(AMachine: TatVirtualMachine);
  var
  AResult: variant;
begin
  with AMachine do
  begin
AResult := string(StrUtils.DecodeSoundexWord(VarToInteger(GetInputArg(0))));
    ReturnOutputArg(AResult);
  end;
end;

procedure TatStrUtilsLibrary.__SoundexSimilar(AMachine: TatVirtualMachine);
  var
  AResult: variant;
begin
  with AMachine do
  begin
case InputArgCount of
2: AResult := StrUtils.SoundexSimilar(VarToStr(GetInputArg(0)),VarToStr(GetInputArg(1)));
3: AResult := StrUtils.SoundexSimilar(VarToStr(GetInputArg(0)),VarToStr(GetInputArg(1)),TSoundexLength(VarToInteger(GetInputArg(2))));
end;
    ReturnOutputArg(AResult);
  end;
end;

procedure TatStrUtilsLibrary.__SoundexCompare(AMachine: TatVirtualMachine);
  var
  AResult: variant;
begin
  with AMachine do
  begin
case InputArgCount of
2: AResult := Integer(StrUtils.SoundexCompare(VarToStr(GetInputArg(0)),VarToStr(GetInputArg(1))));
3: AResult := Integer(StrUtils.SoundexCompare(VarToStr(GetInputArg(0)),VarToStr(GetInputArg(1)),TSoundexLength(VarToInteger(GetInputArg(2)))));
end;
    ReturnOutputArg(AResult);
  end;
end;

procedure TatStrUtilsLibrary.__SoundexProc(AMachine: TatVirtualMachine);
  var
  AResult: variant;
begin
  with AMachine do
  begin
AResult := StrUtils.SoundexProc(VarToStr(GetInputArg(0)),VarToStr(GetInputArg(1)));
    ReturnOutputArg(AResult);
  end;
end;

procedure TatStrUtilsLibrary.__GetWordDelimiters(AMachine: TatVirtualMachine);
var
PropValueSet: set of AnsiChar;
begin
  with AMachine do
  begin
    PropValueSet := StrUtils.WordDelimiters;
    ReturnOutputArg(IntFromSet(PropValueSet, SizeOf(PropValueSet)));
  end;
end;

procedure TatStrUtilsLibrary.Init;
begin
  With Scripter.DefineClass(ClassType) do
  begin
    DefineMethod('ResemblesText',2,tkVariant,nil,__ResemblesText,false,0,'AText: string; AOther: string');
    DefineMethod('AnsiResemblesText',2,tkVariant,nil,__AnsiResemblesText,false,0,'AText: string; AOther: string');
    DefineMethod('ContainsText',2,tkVariant,nil,__ContainsText,false,0,'AText: string; ASubText: string');
    DefineMethod('AnsiContainsText',2,tkVariant,nil,__AnsiContainsText,false,0,'AText: string; ASubText: string');
    DefineMethod('StartsText',2,tkVariant,nil,__StartsText,false,0,'ASubText: string; AText: string');
    DefineMethod('AnsiStartsText',2,tkVariant,nil,__AnsiStartsText,false,0,'ASubText: string; AText: string');
    DefineMethod('EndsText',2,tkVariant,nil,__EndsText,false,0,'ASubText: string; AText: string');
    DefineMethod('AnsiEndsText',2,tkVariant,nil,__AnsiEndsText,false,0,'ASubText: string; AText: string');
    DefineMethod('ReplaceText',3,tkVariant,nil,__ReplaceText,false,0,'AText: string; AFromText: string; AToText: string');
    DefineMethod('AnsiReplaceText',3,tkVariant,nil,__AnsiReplaceText,false,0,'AText: string; AFromText: string; AToText: string');
    DefineMethod('ContainsStr',2,tkVariant,nil,__ContainsStr,false,0,'AText: string; ASubText: string');
    DefineMethod('AnsiContainsStr',2,tkVariant,nil,__AnsiContainsStr,false,0,'AText: string; ASubText: string');
    DefineMethod('StartsStr',2,tkVariant,nil,__StartsStr,false,0,'ASubText: string; AText: string');
    DefineMethod('AnsiStartsStr',2,tkVariant,nil,__AnsiStartsStr,false,0,'ASubText: string; AText: string');
    DefineMethod('EndsStr',2,tkVariant,nil,__EndsStr,false,0,'ASubText: string; AText: string');
    DefineMethod('AnsiEndsStr',2,tkVariant,nil,__AnsiEndsStr,false,0,'ASubText: string; AText: string');
    DefineMethod('ReplaceStr',3,tkVariant,nil,__ReplaceStr,false,0,'AText: string; AFromText: string; AToText: string');
    DefineMethod('AnsiReplaceStr',3,tkVariant,nil,__AnsiReplaceStr,false,0,'AText: string; AFromText: string; AToText: string');
    DefineMethod('DupeString',2,tkVariant,nil,__DupeString,false,0,'AText: string; ACount: Integer');
    DefineMethod('ReverseString',1,tkVariant,nil,__ReverseString,false,0,'AText: string');
    DefineMethod('AnsiReverseString',1,tkVariant,nil,__AnsiReverseString,false,0,'AText: string');
    DefineMethod('StuffString',4,tkVariant,nil,__StuffString,false,0,'AText: string; AStart: Cardinal; ALength: Cardinal; ASubText: string');
    DefineMethod('IfThen',3,tkVariant,nil,__IfThen,false,1,'AValue: Boolean; ATrue: string; AFalse: string = ''');
    DefineMethod('LeftStr',2,tkVariant,nil,__LeftStr,false,0,'AText: AnsiString; ACount: Integer');
    DefineMethod('RightStr',2,tkVariant,nil,__RightStr,false,0,'AText: AnsiString; ACount: Integer');
    DefineMethod('MidStr',3,tkVariant,nil,__MidStr,false,0,'AText: AnsiString; AStart: Integer; ACount: Integer');
    DefineMethod('LeftBStr',2,tkVariant,nil,__LeftBStr,false,0,'AText: AnsiString; AByteCount: Integer');
    DefineMethod('RightBStr',2,tkVariant,nil,__RightBStr,false,0,'AText: AnsiString; AByteCount: Integer');
    DefineMethod('MidBStr',3,tkVariant,nil,__MidBStr,false,0,'AText: AnsiString; AByteStart: Integer; AByteCount: Integer');
    DefineMethod('AnsiLeftStr',2,tkVariant,nil,__AnsiLeftStr,false,0,'AText: string; ACount: Integer');
    DefineMethod('AnsiRightStr',2,tkVariant,nil,__AnsiRightStr,false,0,'AText: string; ACount: Integer');
    DefineMethod('AnsiMidStr',3,tkVariant,nil,__AnsiMidStr,false,0,'AText: string; AStart: Integer; ACount: Integer');
    DefineMethod('SearchBuf',6,tkVariant,nil,__SearchBuf,false,1,'Buf: PAnsiChar; BufLen: Integer; SelStart: Integer; SelLength: Integer; SearchString: AnsiString; Options: TStringSearchOptions = [soDown]');
    DefineMethod('PosEx',3,tkInteger,nil,__PosEx,false,1,'SubStr: string; S: string; Offset: Integer = 1');
    DefineMethod('Soundex',2,tkVariant,nil,__Soundex,false,1,'AText: string; ALength: TSoundexLength = 4');
    DefineMethod('SoundexInt',2,tkInteger,nil,__SoundexInt,false,1,'AText: string; ALength: TSoundexIntLength = 4');
    DefineMethod('DecodeSoundexInt',1,tkVariant,nil,__DecodeSoundexInt,false,0,'AValue: Integer');
    DefineMethod('SoundexWord',1,tkInteger,nil,__SoundexWord,false,0,'AText: string');
    DefineMethod('DecodeSoundexWord',1,tkVariant,nil,__DecodeSoundexWord,false,0,'AValue: Word');
    DefineMethod('SoundexSimilar',3,tkVariant,nil,__SoundexSimilar,false,1,'AText: string; AOther: string; ALength: TSoundexLength = 4');
    DefineMethod('SoundexCompare',3,tkInteger,nil,__SoundexCompare,false,1,'AText: string; AOther: string; ALength: TSoundexLength = 4');
    DefineMethod('SoundexProc',2,tkVariant,nil,__SoundexProc,false,0,'AText: string; AOther: string');
    DefineProp('WordDelimiters',tkInteger,__GetWordDelimiters,nil,nil,false,0);
    AddConstant('soDown',soDown);
    AddConstant('soMatchCase',soMatchCase);
    AddConstant('soWholeWord',soWholeWord);
  end;
end;

class function TatStrUtilsLibrary.LibraryName: string;
begin
  result := 'StrUtils';
end;

initialization
  RegisterScripterLibrary(TatStrUtilsLibrary, True);

{$WARNINGS ON}

end.

