|
TabStop
Calculate number of spaces needed to reach next tab stop |
FUNCky 6.0® COM Component |
obj.TabStop( Col [, Tabsize ] )
Returns
Part
Description
obj A FUNCky Object created by a previous call to CreateObject. Col The current 1 based column position within the target string. Tabsize The size of each tab. Optional. The default is 8.
The number of spaces needed to advance to the next tab stop starting from the column position designated by Col.Description
TabStop calculates the number of spaces needed to expand a TAB character found at the column specified by Col. The value returned will equal the number of spaces needed to advance to the next tab stop based upon the tab width specified by Tabsize.If Tabsize is left off, 8 is used.
The number of spaces returned is relevant to the current column position which is assumed to contain a TAB character. If the column is 1 (first char) and the tab size is 8, the next column position will be 9. Therefore, 8 will be returned which is the correct number of spaces needed to expand to the next tab position.
The spaces must be inserted starting at the column position designated by Col since the column position designated is assumed to contain a TAB character.
The default tab size used by most popular word processors is 4. The default tab size used by DOS is 8.ExampleTabStop assumes a non-proportional font.
// Calculate tabstop x = FUNCky.TabStop(40, 8) // Create a string long enough to get there Str = FUNCky.Replicate(" ", x)
| See Also | TabExpand ChrSwap ChrFound |
|
Copyright© 1988-2012 dLESKO® Inc. All rights reserved. |