Don't like ads? PRO users don't see any ads ;-)
Guest

Untitled

By: a guest on May 14th, 2012  |  syntax: None  |  size: 0.26 KB  |  hits: 13  |  expires: Never
download  |  raw  |  embed  |  report abuse  |  print
Text below is selected. Please press Ctrl+C to copy to your clipboard. (⌘+C on Mac)
  1. How can copy 4 character from begining of string to end of string?
  2. var
  3. s:string;
  4. begin
  5. s:='Hello1234567';
  6.  
  7. end;
  8. end.
  9.        
  10. var
  11.   s: string;
  12. begin
  13.   s := 'Hello1234567';
  14.   ShowMessage(Copy(s, 1, 4));
  15.   ShowMessage(Copy(s, 5, 4));
  16.   ShowMessage(Copy(s, 9, 4));
  17. end;