9270
|
1 /** Copyright (C) 2017 by Bundesanstalt für Gewässerkunde |
|
2 * Software engineering by |
|
3 * Björnsen Beratende Ingenieure GmbH |
|
4 * Dr. Schumacher Ingenieurbüro für Wasser und Umwelt |
|
5 * |
|
6 * This file is Free Software under the GNU AGPL (>=v3) |
|
7 * and comes with ABSOLUTELY NO WARRANTY! Check out the |
|
8 * documentation coming with Dive4Elements River for details. |
|
9 */ |
|
10 package org.dive4elements.river.client.client.ui; |
|
11 |
|
12 /** |
|
13 * @author Domenico Nardi Tironi |
|
14 * |
|
15 */ |
|
16 public class StringArrayParseHelper { |
|
17 |
|
18 public static final String[] getArrayFromRawString(final String raw) { |
|
19 if (raw != null) { |
|
20 return raw.trim().replaceAll("\\s+", " ").split(" "); |
|
21 } |
|
22 return new String[] {}; |
|
23 } |
|
24 |
|
25 public static final String trimRawString(final String raw) { |
|
26 if (raw != null) { |
|
27 return raw.trim().replaceAll("\\s+", " "); |
|
28 } |
|
29 return ""; |
|
30 } |
|
31 |
|
32 } |