comparison flys-backend/src/main/java/de/intevation/flys/utils/StringUtil.java @ 2344:ec0ffc842573

Extracted StringUtil.wWrap method from WaterlevelSelectState . flys-backend/trunk@2858 c6561f87-3c4e-4783-a992-168aeb5c3f6f
author Felix Wolfsteller <felix.wolfsteller@intevation.de>
date Wed, 28 Sep 2011 15:35:54 +0000
parents 6662b0ea20c1
children 2e993a847e31
comparison
equal deleted inserted replaced
2343:6662b0ea20c1 2344:ec0ffc842573
94 94
95 value = value.substring(start + 1, end); 95 value = value.substring(start + 1, end);
96 96
97 return value; 97 return value;
98 } 98 }
99
100
101 /**
102 * From "Q=1" make "W(Q=1)".
103 * @return original string wraped in "W()" if it contains a "Q", original
104 * string otherwise.
105 */
106 public static String wWrap(String wOrQ) {
107 return (wOrQ != null && wOrQ.indexOf("Q") >=0)
108 ? "W(" + wOrQ + ")"
109 : wOrQ;
110 }
99 111
100 112
101 public static final String [] splitLines(String s) { 113 public static final String [] splitLines(String s) {
102 if (s == null) { 114 if (s == null) {
103 return null; 115 return null;

http://dive4elements.wald.intevation.org