23 lines
529 B
ObjectPascal
23 lines
529 B
ObjectPascal
|
program string_functions;
|
||
|
|
||
|
{$mode objfpc}{$H+}
|
||
|
|
||
|
uses strutils, sysutils;
|
||
|
|
||
|
var st: string;
|
||
|
|
||
|
begin
|
||
|
WriteLn('Enter a word or pharase ([Enter] completes the entry)');
|
||
|
ReadLn(st);
|
||
|
WriteLn('You typed: ', st);
|
||
|
WriteLn('Your text converted to uppercase: ', UpperCase(st));
|
||
|
WriteLn('Your text converted to lowercase: ', LowerCase(st));
|
||
|
WriteLn('Your text converted to proper case: ',
|
||
|
AnsiProperCase(st, StdWordDelims));
|
||
|
WriteLn('Your text reversed: ', ReverseString(st));
|
||
|
{$IFDEF WINDOWS}
|
||
|
ReadLn;
|
||
|
{$ENDIF}
|
||
|
end.
|
||
|
|