jSyncManager

org.jSyncManager.API.Tools
Class StringManipulator

java.lang.Object
  |
  +--org.jSyncManager.API.Tools.StringManipulator

public final class StringManipulator
extends java.lang.Object

A class to provide string manipulation routines. This class only provides static methods, and thus cannot be initialized.

Version:
$Revision: 1.6 $
Author:
Brad BARCLAY <bbarclay@jsyncmanager.org>
Last modified by: $Author: yaztromo $ on $Date: 2003/05/13 06:19:42 $.

Method Summary
static int getCharArrayLength(byte[] data, int i)
          Returns the length of the char array from the specified point in the specified data array.
static java.lang.String strip(java.lang.String s)
          This method returns the substring from the first character to the first null, if one exists.
 
Methods inherited from class java.lang.Object
, clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

strip

public static java.lang.String strip(java.lang.String s)
This method returns the substring from the first character to the first null, if one exists.
Parameters:
s - the string to strip.
Returns:
the substring of the given string up to the first null.

getCharArrayLength

public static int getCharArrayLength(byte[] data,
                                     int i)
Returns the length of the char array from the specified point in the specified data array. This method basically counts the number of bytes between the specified start point, and the first null encountered, or the end of the array.
Parameters:
data - the byte array to test.
i - the starting index to scan from.
Returns:
the number of bytes between i and the first null.

jSyncManager

Copyright (c) 1999 - 2003 Brad BARCLAY and others. All Rights Reserved.