mirror of
https://github.com/jenkinsci/jenkins.git
synced 2026-11-04 23:55:52 +00:00
added another method
git-svn-id: https://hudson.dev.java.net/svn/hudson/trunk/hudson/main@14788 71c3de6d-444a-0410-be80-ed276b4c234a
This commit is contained in:
1 parent
0721611f7d
commit
59c4d4d9c5
1 file changed
+8
-1
@@ -26,6 +26,13 @@ public abstract class AbstractMarkupText {
|
||||
*/
|
||||
public abstract String getText();
|
||||
|
||||
/**
|
||||
* Length of the plain text.
|
||||
*/
|
||||
public final int length() {
|
||||
return getText().length();
|
||||
}
|
||||
|
||||
/**
|
||||
* Adds a start tag and end tag at the specified position.
|
||||
*
|
||||
@@ -39,7 +46,7 @@ public abstract class AbstractMarkupText {
|
||||
* Adds a start tag and end tag around the entire text
|
||||
*/
|
||||
public final void wrapBy(String startTag, String endTag) {
|
||||
addMarkup(0,getText().length(),startTag,endTag);
|
||||
addMarkup(0,length(),startTag,endTag);
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Reference in new issue
Block a user