SynSoft Java Standard Library

synsoft.org


org.synsoft.text
Class TextFormat

java.lang.Object
  |
  +--org.synsoft.text.TextFormat

public class TextFormat
extends java.lang.Object

This class provides text formatting facilities.


Field Summary
static Version scm_version
          Constant instance of version information for class.
 
Constructor Summary
TextFormat()
           
 
Method Summary
static java.lang.String tabify(java.lang.String str, int tabstop)
          This method converts takes a string containing spaces and changes them to tabs, according to the given tabstop specified, and discards any trailing spaces.
static java.lang.String tabify(java.lang.String str, int tabstop, boolean bDiscardTrailingSpaces)
          This method converts takes a string containing spaces and changes them to tabs, according to the given tabstop specified.
static java.lang.String tabify(java.lang.String str, int tabstop, boolean bDiscardTrailingSpaces, int initialCharIndex)
          This method converts takes a string containing spaces and changes them to tabs, according to the given tabstop specified.
static java.lang.String untabify(java.lang.String str, int tabstop)
          This method converts takes a string containing tabs and changes them to spaces, according to the given tabstop specified.
static java.lang.String untabify(java.lang.String str, int tabstop, boolean bDiscardTrailingSpaces)
          This method converts takes a string containing tabs and changes them to spaces, according to the given tabstop specified.
static java.lang.String untabify(java.lang.String str, int tabstop, boolean bDiscardTrailingSpaces, int initialCharIndex)
          This method converts takes a string containing tabs and changes them to spaces, according to the given tabstop specified.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

scm_version

public static final Version scm_version
Constant instance of version information for class.
Constructor Detail

TextFormat

public TextFormat()
Method Detail

tabify

public static java.lang.String tabify(java.lang.String str,
                                      int tabstop)
This method converts takes a string containing spaces and changes them to tabs, according to the given tabstop specified, and discards any trailing spaces. The lines may contain multiple lines (separated by carriage return characters).
Parameters:
str - The string to convert
tabstop - The size of the tabstop
Returns:
The converted string

tabify

public static java.lang.String tabify(java.lang.String str,
                                      int tabstop,
                                      boolean bDiscardTrailingSpaces)
This method converts takes a string containing spaces and changes them to tabs, according to the given tabstop specified. The lines may contain multiple lines (separated by carriage return characters).
Parameters:
str - The string to convert
tabstop - The size of the tabstop
bDiscardTrailingSpaces - Discards spaces at the end of any lines
Returns:
The converted string

tabify

public static java.lang.String tabify(java.lang.String str,
                                      int tabstop,
                                      boolean bDiscardTrailingSpaces,
                                      int initialCharIndex)
This method converts takes a string containing spaces and changes them to tabs, according to the given tabstop specified. The lines may contain multiple lines (separated by carriage return characters).
Parameters:
str - The string to convert
tabstop - The size of the tabstop
bDiscardTrailingSpaces - Discards spaces at the end of any lines
initialCharIndex - Specifies an initial index into the tabstop columns
Returns:
The converted string

untabify

public static java.lang.String untabify(java.lang.String str,
                                        int tabstop)
This method converts takes a string containing tabs and changes them to spaces, according to the given tabstop specified. The lines may contain multiple lines (separated by carriage return characters).
Parameters:
str - The string to convert
tabstop - The size of the tabstop
Returns:
The converted string

untabify

public static java.lang.String untabify(java.lang.String str,
                                        int tabstop,
                                        boolean bDiscardTrailingSpaces)
This method converts takes a string containing tabs and changes them to spaces, according to the given tabstop specified. The lines may contain multiple lines (separated by carriage return characters).
Parameters:
str - The string to convert
tabstop - The size of the tabstop
bDiscardTrailingSpaces - This parameter is ignored in the current implementation
Returns:
The converted string

untabify

public static java.lang.String untabify(java.lang.String str,
                                        int tabstop,
                                        boolean bDiscardTrailingSpaces,
                                        int initialCharIndex)
This method converts takes a string containing tabs and changes them to spaces, according to the given tabstop specified. The lines may contain multiple lines (separated by carriage return characters).
Parameters:
str - The string to convert
tabstop - The size of the tabstop
bDiscardTrailingSpaces - This parameter is ignored in the current implementation
initialCharIndex - Specifies an initial index into the tabstop columns
Returns:
The converted string

version 2.0.1.231

Copyright © Synesis Software. Licensed according to the Synesis Software Standard Public License