Logo Search packages:      
Sourcecode: jmk version File versions  Download package

static StringList edu::neu::ccs::jmk::StringUtils::subst ( String  pattern,
String  replacement,
StringList  input,
StringList  list 
) [inline, static, package]

Applies stringSubst to each element of the input.

Definition at line 113 of file StringUtils.java.

References edu::neu::ccs::jmk::StringList::getRest(), edu::neu::ccs::jmk::StringList::getString(), edu::neu::ccs::jmk::StringList::setRest(), and stringSubst().

    if (input == null)
      return list;
    else {
      StringList head = new StringList("");
      StringList last = head;
      for (; input != null; input = input.getRest()) {
      String string = input.getString();
      string = stringSubst(pattern, replacement, string);
      StringList temp = new StringList(string);
      last = temp;
      return head.getRest();

Generated by  Doxygen 1.6.0   Back to index