Splitting String with delimiter
Try:
def (value1, value2) = '1128-2'.tokenize( '-' )
How are you calling split
? It works like this:
def values = '1182-2'.split('-')
assert values[0] == '1182'
assert values[1] == '2'
Try:
def (value1, value2) = '1128-2'.tokenize( '-' )
How are you calling split
? It works like this:
def values = '1182-2'.split('-')
assert values[0] == '1182'
assert values[1] == '2'