jme3tools.navigation
クラス StringUtil

java.lang.Object
  上位を拡張 jme3tools.navigation.StringUtil

public class StringUtil
extends java.lang.Object

A collection of String utilities.


コンストラクタの概要
StringUtil()
           
 
メソッドの概要
 java.lang.String boolArrToStr(boolean[] arr)
           
 java.lang.String padNum(double num, int wholeLen, int decimalPlaces)
          Right aligns a double number with spaces for printing
 java.lang.String padNum(float num, int wholeLen, int decimalPlaces)
          Right aligns a float number with spaces for printing
 java.lang.String padNum(int num, int totalLen)
          Right aligns an integer number with spaces for printing
 java.lang.String padNum(long num, int totalLen)
          Right aligns a long number with spaces for printing
 java.lang.String padNumZero(double num, int wholeLen, int decimalPlaces)
          Right aligns a double number with zeros for printing
 java.lang.String padNumZero(float num, int wholeLen, int decimalPlaces)
          Right aligns a float number with zeros for printing
 java.lang.String padNumZero(int num, int totalLen)
          Right aligns an integer number with zeros for printing
 java.lang.String padNumZero(long num, int totalLen)
          Right aligns a long number with zeros for printing
 java.lang.String padStringRight(java.lang.String input, int wholeLen)
          Right aligns a float number with zeros for printing
 java.lang.String prettyNum(double num)
          Formats a double nicely for printing: THIS DOES NOT ROUND!!!!
 java.lang.String[] splitDelimitedStr(java.lang.String str, java.lang.String delimiter)
          Splits a newline (\n) delimited string into an array of strings
 
クラス java.lang.Object から継承されたメソッド
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

コンストラクタの詳細

StringUtil

public StringUtil()
メソッドの詳細

splitDelimitedStr

public java.lang.String[] splitDelimitedStr(java.lang.String str,
                                            java.lang.String delimiter)
Splits a newline (\n) delimited string into an array of strings

パラメータ:
str - the string to split up
delimiter - the delimiter to use in splitting

padNum

public java.lang.String padNum(long num,
                               int totalLen)
Right aligns a long number with spaces for printing

パラメータ:
num - the number to be aligned
totalLen - the total length of the padded string
戻り値:
the padded number

padNumZero

public java.lang.String padNumZero(long num,
                                   int totalLen)
Right aligns a long number with zeros for printing

パラメータ:
num - the number to be aligned
totalLen - the total length of the padded string
戻り値:
the padded number

padNum

public java.lang.String padNum(int num,
                               int totalLen)
Right aligns an integer number with spaces for printing

パラメータ:
num - the number to be aligned
totalLen - the total length of the padded string
戻り値:
the padded number

padNumZero

public java.lang.String padNumZero(int num,
                                   int totalLen)
Right aligns an integer number with zeros for printing

パラメータ:
num - the number to be aligned
totalLen - the total length of the padded string
戻り値:
the padded number

padNum

public java.lang.String padNum(double num,
                               int wholeLen,
                               int decimalPlaces)
Right aligns a double number with spaces for printing

パラメータ:
num - the number to be aligned
wholeLen - the total length of the padded string
戻り値:
the padded number

padNumZero

public java.lang.String padNumZero(double num,
                                   int wholeLen,
                                   int decimalPlaces)
Right aligns a double number with zeros for printing

パラメータ:
num - the number to be aligned
wholeLen - the total length of the padded string
戻り値:
the padded number

padNum

public java.lang.String padNum(float num,
                               int wholeLen,
                               int decimalPlaces)
Right aligns a float number with spaces for printing

パラメータ:
num - the number to be aligned
wholeLen - the total length of the padded string
戻り値:
the padded number

padNumZero

public java.lang.String padNumZero(float num,
                                   int wholeLen,
                                   int decimalPlaces)
Right aligns a float number with zeros for printing

パラメータ:
num - the number to be aligned
wholeLen - the total length of the padded string
戻り値:
the padded number

padStringRight

public java.lang.String padStringRight(java.lang.String input,
                                       int wholeLen)
Right aligns a float number with zeros for printing

パラメータ:
num - the number to be aligned
wholeLen - the total length of the padded string
戻り値:
the padded number

boolArrToStr

public java.lang.String boolArrToStr(boolean[] arr)
パラメータ:
arr - a boolean array to be represented as a string
戻り値:
the array as a string

prettyNum

public java.lang.String prettyNum(double num)
Formats a double nicely for printing: THIS DOES NOT ROUND!!!!

パラメータ:
num - the double to be turned into a pretty string
戻り値:
the pretty string