100's of Methods built-in

Modern Pascal contains an extensive String library

Most common string tasks

We reviewed millions of program source files and built our String library.

Primitive Data Types

In Pascal String and AnsiString are native primitives not objects.

PChar is a Null Terminated String

If you are used to working with C type strings, we have you covered.

Program GeneralPurposeStrings.v1180922; uses Strings; var S,S2:String; FirstName:String; LastName:String; Begin S:='Hello World!'; FirstName:='Ozz'; LastName:='Nixon'; Writeln(S); Writeln(Uppercase(S)); Writeln(Lowercase(S)); Writeln(FirstName+' '+LastName); Writeln('"'+Copy(S,1,5)+'"'); Writeln('"'+Copy(S,2,5)+'"'); Writeln(Length(S)); Writeln(S+#13#10+Firstname+' '+LastName); Writeln('The space is at ',pos(#32,S)); S:=" Quotations are acceptable in Modern Pascal! "; S2:=Trim(S); Writeln(WordCount(S),' words, and ',WordCount(S2),' words.'); Writeln('Strings the same=',S=S2,', how about now=',Trim(S)=Trim(S2)); Writeln(ReverseStr(S2)); Writeln(StringReplace(S2,#32#32,#32,[rfReplaceAll])); End.

Output from code above...