lazyj.page.tags
Class Cut

java.lang.Object
  extended by lazyj.page.tags.Cut
All Implemented Interfaces:
StringFormat

public class Cut
extends java.lang.Object
implements StringFormat

cutN return the first N characters from the value. It will leave in the return text the tags A, B, U, I, FONT but will not count their length but only the length of the text that is actually displayed.

Since:
2006-10-13
Author:
costing
See Also:
Strip

Constructor Summary
Cut()
           
 
Method Summary
static java.lang.String cut(java.lang.String sValue, int iCut)
          Cuts a string, leaving only the first N characters from it, jumping over tags.
 java.lang.String format(java.lang.String sTag, java.lang.String sOption, java.lang.String sValue)
          Cuts a string, leaving only the first N characters from it, jumping over tags.
static void main(java.lang.String[] args)
          Debug method
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Cut

public Cut()
Method Detail

format

public java.lang.String format(java.lang.String sTag,
                               java.lang.String sOption,
                               java.lang.String sValue)
Cuts a string, leaving only the first N characters from it, jumping over tags.

Specified by:
format in interface StringFormat
Parameters:
sTag - ignored
sOption - tag option, in the form "cutN", with N>0
sValue - original string
Returns:
the first N visible characters from the string

cut

public static java.lang.String cut(java.lang.String sValue,
                                   int iCut)
Cuts a string, leaving only the first N characters from it, jumping over tags.

Parameters:
sValue -
iCut -
Returns:
the first N visible characters from the string

main

public static void main(java.lang.String[] args)
Debug method

Parameters:
args -