The SDL Component Suite is an industry leading collection of components supporting scientific and engineering computing. Please visit the SDL Web site for more information....



ConvertToTabs


Unit: SDL_stringl
Class: none
Declaration: function ConvertToTabs (InString: string; ConvColonSpace, ConvSpacePlusMinus: boolean): string;

The function ConvertToTabs converts multiple consecutive spaces to tabs. Further, spaces are converted to tabs even if the are singular after colons (if the parameter ConvColonSpace is TRUE) and before '+/-' substrings (if the parameter ConvSpacePlusMinus is TRUE).

Example: The strings
'The price of the house is        239000 EUR'
'This is the price: 239000 EUR'
are converted to
'The price of the house is'#9'239000 EUR'
'This is the price:'#9'239000 EUR'
by calling Outstring := ConvertToTabs(InString, TRUE, FALSE);



Last Update: 2023-Feb-06