org.moyoman.module.fuseki.igofuseki
Class Str

java.lang.Object
  |
  +--org.moyoman.module.fuseki.igofuseki.Str

class Str
extends Object

Utility of String.


Constructor Summary
(package private) Str()
           
 
Method Summary
(package private) static String after(String src, String des)
          Get string.
(package private) static String atti(String src, String des)
          Get attribute.
(package private) static String dat(String str, String tag, String lim)
          Get data form tags.
(package private) static String dat(String str, String tag, String lim, boolean addtag)
          Get data form tags.
(package private) static String del(String src, String des)
          Del string.
(package private) static String del(String str, String s1, boolean all)
          Del string.
(package private) static boolean empty(String str)
          Check String is empty.
(package private) static boolean has(String src, String des)
          Check a string is in or not.
(package private) static String it(int i)
          Int to string.
(package private) static boolean out(String src, String des)
          Check a string is out or not.
(package private) static String replace(String src, String s1, String s2)
          Replace string.
(package private) static String replace(String src, String d1, String d2, boolean all)
          Replace string.
(package private) static String[] split(String str, String div)
          Split string.
(package private) static String[] split(String str, String head, String tail)
          Split string.
(package private) static int toInt(String str)
          String to int.
(package private) static int toInt(String str, int def)
          String to int.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Str

Str()
Method Detail

dat

static String dat(String str,
                  String tag,
                  String lim)
Get data form tags.

Parameters:
str - Src data.
tag - Tags.
lim - End of the tag. Return data in tags.

dat

static String dat(String str,
                  String tag,
                  String lim,
                  boolean addtag)
Get data form tags.

Parameters:
str - Src data.
tag - Tags.
lim - End of the tag.
addtag - True if add tag string to the output. Return data in tags.

empty

static boolean empty(String str)
Check String is empty.

Parameters:
str - Src data. Return true if String is empty.

toInt

static int toInt(String str)
String to int.

Parameters:
str - Src data. Return int value.

toInt

static int toInt(String str,
                 int def)
String to int.

Parameters:
str - Src data.
def - Default value. Return int value.

it

static String it(int i)
Int to string.


has

static boolean has(String src,
                   String des)
Check a string is in or not.

Parameters:
src - Src String.
des - Des String. Return true if src has des in it.

out

static boolean out(String src,
                   String des)
Check a string is out or not.

Parameters:
src - Src String.
des - Des String. Return true if src has no des in it.

after

static String after(String src,
                    String des)
Get string.

Parameters:
src - Src String.
des - Des String. Return string after des.

replace

static String replace(String src,
                      String s1,
                      String s2)
Replace string.

Parameters:
src - Src String.
s1 - Old String.
s2 - New String. Return replaced string.

replace

static String replace(String src,
                      String d1,
                      String d2,
                      boolean all)
Replace string.

Parameters:
src - Src String.
d1 - Old String.
d2 - New String.
all - True if replace all. Return replaced string.

del

static String del(String src,
                  String des)
Del string.

Parameters:
src - Src String.
des - Des String. Return new string after del.

del

static String del(String str,
                  String s1,
                  boolean all)
Del string.

Parameters:
all - True if del all. Return new string after del.

split

static String[] split(String str,
                      String div)
Split string.

Parameters:
str - Src String.
div - Divide String. Return a array of splited string.

split

static String[] split(String str,
                      String head,
                      String tail)
Split string.

Parameters:
str - Src String.
head - Start of divide.
tail - End of divide. Return a array of splited string.

atti

static String atti(String src,
                   String des)
Get attribute.

Parameters:
src - Src String.
des - Des String. Return attribute string.