org.expasy.jpl.commons.base.string
Class StringUtils

java.lang.Object
  extended by org.expasy.jpl.commons.base.string.StringUtils

public final class StringUtils
extends Object


Constructor Summary
StringUtils()
           
 
Method Summary
static List<Integer> indicesOf(String target, String motif)
          Return the indices of a motif found within a target string.
static String join(Iterable<String> it, String delimiter)
           
static int numOfString(String target, String motif)
          Return the number of time a motif is found within a target string.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

StringUtils

public StringUtils()
Method Detail

indicesOf

public static final List<Integer> indicesOf(String target,
                                            String motif)
Return the indices of a motif found within a target string.

Parameters:
target - the string to search within.
motif - the string to search for.
Returns:
a list of positive integers (empty list if motif was not found).

numOfString

public static final int numOfString(String target,
                                    String motif)
Return the number of time a motif is found within a target string.

Parameters:
target - the string to search within.
motif - the string to search for.
Returns:
the number of motifs found (0 if no motif was found).

join

public static String join(Iterable<String> it,
                          String delimiter)


Copyright (c) 2012 Swiss Institute of Bioinformatics. All rights reserved.