|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectfr.obeo.acceleo.gen.template.scripts.imports.services.StringServices
public class StringServices
System services for String elements.
Constructor Summary | |
---|---|
StringServices()
|
Method Summary | |
---|---|
java.lang.String |
charAt(java.lang.String s,
int index)
Gets the char at a given position. |
boolean |
endsWith(java.lang.String s,
java.lang.String arg)
Indicates if a string ends with a given substring. |
boolean |
equalsIgnoreCase(java.lang.String s,
java.lang.String arg)
Indicates if two strings are equal, ignoring case. |
fr.obeo.acceleo.gen.template.eval.ENode |
indentSpace(fr.obeo.acceleo.gen.template.eval.ENode node)
Indents a string with ' '. |
fr.obeo.acceleo.gen.template.eval.ENode |
indentTab(fr.obeo.acceleo.gen.template.eval.ENode node)
Indents a string with '\t'. |
int |
indexOf(java.lang.String buffer,
java.lang.String arg)
Returns the position of a substring in a string. |
int |
indexOf(java.lang.String buffer,
java.lang.String arg,
int index)
Returns the position of a substring a the string, starting at a specified position. |
int |
lastIndexOf(java.lang.String buffer,
java.lang.String arg)
Returns the last position of a substring in a string. |
int |
lastIndexOf(java.lang.String buffer,
java.lang.String arg,
int index)
Returns the last position of a substring in a string, starting at a specified position. |
int |
length(java.lang.String s)
Returns the string's length |
boolean |
matches(java.lang.String s,
java.lang.String regex)
Indicates if a string matches a regex. |
java.lang.String |
replaceAll(java.lang.String buffer,
java.lang.String s1,
java.lang.String s2)
Replaces all occurences of substring by another substring in a string. |
java.lang.String |
replaceFirst(java.lang.String buffer,
java.lang.String s1,
java.lang.String s2)
Replaces the first occurence of a substring by another substring in a string. |
java.util.List |
split(java.lang.String buffer,
java.lang.String arg)
Splits a string with a substring. |
boolean |
startsWith(java.lang.String s,
java.lang.String arg)
Indicates if a string starts with a given substring. |
fr.obeo.acceleo.gen.template.eval.ENode |
substring(fr.obeo.acceleo.gen.template.eval.ENode node,
int begin)
Gets a substring of a string that begins at a specified index and ends at the end of the string. |
fr.obeo.acceleo.gen.template.eval.ENode |
substring(fr.obeo.acceleo.gen.template.eval.ENode node,
int begin,
int end)
Returns a substring of a string that begins at a specified index and ends at end - 1. |
fr.obeo.acceleo.gen.template.eval.ENode |
toL1Case(fr.obeo.acceleo.gen.template.eval.ENode node)
Translates the first character of the given string to lower case. |
fr.obeo.acceleo.gen.template.eval.ENode |
toLowerCase(fr.obeo.acceleo.gen.template.eval.ENode node)
Returns a lower case representation of a string. |
fr.obeo.acceleo.gen.template.eval.ENode |
toU1Case(fr.obeo.acceleo.gen.template.eval.ENode node)
Translates the first character of the given string to upper case. |
fr.obeo.acceleo.gen.template.eval.ENode |
toUpperCase(fr.obeo.acceleo.gen.template.eval.ENode node)
Returns an upper case representation of a string. |
fr.obeo.acceleo.gen.template.eval.ENode |
trim(fr.obeo.acceleo.gen.template.eval.ENode node)
Removes leading and trailing spaces of a string. |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public StringServices()
Method Detail |
---|
public int length(java.lang.String s)
s
- is the string
public fr.obeo.acceleo.gen.template.eval.ENode toUpperCase(fr.obeo.acceleo.gen.template.eval.ENode node)
node
- is the current node
public fr.obeo.acceleo.gen.template.eval.ENode toLowerCase(fr.obeo.acceleo.gen.template.eval.ENode node)
node
- is the current node
public fr.obeo.acceleo.gen.template.eval.ENode toU1Case(fr.obeo.acceleo.gen.template.eval.ENode node)
node
- is the current node
public fr.obeo.acceleo.gen.template.eval.ENode toL1Case(fr.obeo.acceleo.gen.template.eval.ENode node)
node
- is the current node
public fr.obeo.acceleo.gen.template.eval.ENode substring(fr.obeo.acceleo.gen.template.eval.ENode node, int begin, int end)
node
- is the current nodebegin
- is the beginning index, inclusiveend
- is the ending index, exclusive
public fr.obeo.acceleo.gen.template.eval.ENode substring(fr.obeo.acceleo.gen.template.eval.ENode node, int begin)
node
- is the current nodebegin
- is the beginning index, inclusive
public java.lang.String replaceAll(java.lang.String buffer, java.lang.String s1, java.lang.String s2)
buffer
- is the buffers1
- is the substring to replaces2
- is the new substring
public java.lang.String replaceFirst(java.lang.String buffer, java.lang.String s1, java.lang.String s2)
buffer
- is the buffers1
- is the substring to replaces2
- is the new substring
public fr.obeo.acceleo.gen.template.eval.ENode trim(fr.obeo.acceleo.gen.template.eval.ENode node)
node
- is the current node
public boolean startsWith(java.lang.String s, java.lang.String arg)
s
- is the stringarg
- is the substring
public boolean endsWith(java.lang.String s, java.lang.String arg)
s
- is the stringarg
- is the substring
public boolean equalsIgnoreCase(java.lang.String s, java.lang.String arg)
s
- is the first stringarg
- is the second string
public boolean matches(java.lang.String s, java.lang.String regex)
s
- is the stringregex
- is the regex
public java.lang.String charAt(java.lang.String s, int index)
s
- is the stringindex
- is the position
public int indexOf(java.lang.String buffer, java.lang.String arg)
buffer
- is the stringarg
- is the substring
public int indexOf(java.lang.String buffer, java.lang.String arg, int index)
buffer
- is the stringarg
- is the substringindex
- is the position where the research starts form
public int lastIndexOf(java.lang.String buffer, java.lang.String arg)
buffer
- is the stringarg
- is the substring
public int lastIndexOf(java.lang.String buffer, java.lang.String arg, int index)
buffer
- is the stringarg
- is the substringindex
- is the position where the research starts form
public java.util.List split(java.lang.String buffer, java.lang.String arg)
buffer
- is the stringarg
- is the substring
public fr.obeo.acceleo.gen.template.eval.ENode indentSpace(fr.obeo.acceleo.gen.template.eval.ENode node)
node
- is the current node
public fr.obeo.acceleo.gen.template.eval.ENode indentTab(fr.obeo.acceleo.gen.template.eval.ENode node)
node
- is the current node
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |