Left, right, leftback, rightback and replacesubstring in java

I posted some common string functions that I’ve been using alot during the years in @formula, lotusscript (strleft, strright, strrightback, strleftback) and later in SSJS. So I thought that I need them in Java too. There might be some features like the one with dot in the replacesubstring function, feel free to comment so will I fix that 😉

Hope you find it useful.

OpenNTf.org Snippets

  1. Hi Fredrik

    why not to use org.apache.commons.lang.StringUtils?

  2. Personally I’ve used the Apache common StringUtils a lot. No need to reinvent the wheel.

    https://commons.apache.org/proper/commons-lang/javadocs/api-3.4/org/apache/commons/lang3/StringUtils.html

    Guava also offers some nice functions btw.

    https://github.com/google/guava/wiki/StringsExplained

  3. Fredrik Norling

    StringUtils is a great library. But still you need to know is it bundled with the Domino server or not?

    Is it compatible with the Java version taht is shipped with the Domino server?

    But that is also an alternative that has more great functions.
    http://commons.apache.org/proper/commons-lang/javadocs/api-3.1/org/apache/commons/lang3/StringUtils.html

  4. Hi

    this saved me a lot of time.
    Fantasic work – such a simple need, very fiddly to write & test, thanks !

    Doug

Leave a Comment


NOTE - You can use these HTML tags and attributes:
<a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong>

This site uses Akismet to reduce spam. Learn how your comment data is processed.