fork(1) download
  1. program ideone;
  2. Uses sysutils;
  3. var
  4. suaString : string;
  5. TAB : char;
  6. tabCount : Integer;
  7. stringOfTabs : string;
  8. begin
  9.  
  10. TAB := #9;
  11. suaString:= TAB + TAB + TAB + 'Texto';
  12. tabCount := Length(suaString) - Length(TrimLeft(suaString));
  13. stringOfTabs := StringOfChar(TAB,tabCount);
  14.  
  15. writeln('A sua string: ', suaString);
  16. writeln('Numero de Tabs: ', tabCount);
  17. writeln(stringOfTabs + 'Tabs aplicados a outra string');
  18.  
  19. end.
Success #stdin #stdout 0s 388KB
stdin
Standard input is empty
stdout
A sua string: 			Texto
Numero de Tabs: 3
			Tabs aplicados a outra string