Mercurial > dive4elements > gnv-client
comparison gnv-artifacts/src/main/java/de/intevation/gnv/utils/StringUtils.java @ 442:52e031261eaa
Create a new 'gnv' section in config file.
gnv-artifacts/trunk@490 c6561f87-3c4e-4783-a992-168aeb5c3f6f
author | Sascha L. Teichmann <sascha.teichmann@intevation.de> |
---|---|
date | Tue, 29 Dec 2009 10:09:26 +0000 |
parents | 8975de9d7483 |
children | c4156275c1e1 |
comparison
equal
deleted
inserted
replaced
441:31a12ff53f99 | 442:52e031261eaa |
---|---|
10 | 10 |
11 public static final String [] append(String [] haystack, String straw) { | 11 public static final String [] append(String [] haystack, String straw) { |
12 if (haystack == null) { | 12 if (haystack == null) { |
13 return new String [] { straw }; | 13 return new String [] { straw }; |
14 } | 14 } |
15 String [] nhaystack = new String[haystack.length]; | 15 String [] nhaystack = new String[haystack.length + 1]; |
16 System.arraycopy(haystack, 0, nhaystack, 0, haystack.length); | 16 System.arraycopy(haystack, 0, nhaystack, 0, haystack.length); |
17 nhaystack[haystack.length] = straw; | 17 nhaystack[haystack.length] = straw; |
18 return nhaystack; | 18 return nhaystack; |
19 } | 19 } |
20 | 20 |