Skip to content

Commit

Permalink
add concat methods
Browse files Browse the repository at this point in the history
  • Loading branch information
michaeloffner committed Feb 20, 2024
1 parent 83351f2 commit a0222ea
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 2 deletions.
16 changes: 16 additions & 0 deletions core/src/main/java/lucee/commons/lang/StringUtil.java
Original file line number Diff line number Diff line change
Expand Up @@ -123,6 +123,22 @@ private static boolean _contains(char[] chars, char c) {
return false;
}

public static String concat(String l, String r) {
return new StringBuilder(l.length() + r.length()).append(l).append(r).toString();
}

public static String concat(String l, String m, String r) {
return new StringBuilder(l.length() + m.length() + r.length()).append(l).append(m).append(r).toString();
}

public static String concat(String s1, String s2, String s3, String s4) {
return new StringBuilder(s1.length() + s2.length() + s3.length() + s4.length()).append(s1).append(s2).append(s3).append(s4).toString();
}

public static String concat(String s1, String s2, String s3, String s4, String s5) {
return new StringBuilder(s1.length() + s2.length() + s3.length() + s4.length() + s5.length()).append(s1).append(s2).append(s3).append(s4).append(s5).toString();
}

/**
* do first Letter Upper case
*
Expand Down
2 changes: 1 addition & 1 deletion loader/build.xml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<project default="core" basedir="." name="Lucee"
xmlns:resolver="antlib:org.apache.maven.resolver.ant">

<property name="version" value="6.1.0.52-SNAPSHOT"/>
<property name="version" value="6.1.0.53-SNAPSHOT"/>

<taskdef uri="antlib:org.apache.maven.resolver.ant" resource="org/apache/maven/resolver/ant/antlib.xml">
<classpath>
Expand Down
2 changes: 1 addition & 1 deletion loader/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@

<groupId>org.lucee</groupId>
<artifactId>lucee</artifactId>
<version>6.1.0.52-SNAPSHOT</version>
<version>6.1.0.53-SNAPSHOT</version>
<packaging>jar</packaging>

<name>Lucee Loader Build</name>
Expand Down

0 comments on commit a0222ea

Please sign in to comment.