public class ConfigurationValueFinder extends Object
Modifier and Type | Method and Description |
---|---|
static String |
findFirstConfigurationValue(String configurationContents,
String keyToFind)
This method will find the first given
keyToFind in configurationContents and then
return the value of it assuming that the key/value is represented in the following formats:
"key" : "value"
'key' : 'value'
key : value
key:value
key=value
Whitespace and " and ' characters are removed. |
public static String findFirstConfigurationValue(String configurationContents, String keyToFind)
keyToFind
in configurationContents
and then
return the value of it assuming that the key/value is represented in the following formats:
configurationContents
- the configuration text to searchkeyToFind
- the key to find in the configurationContents
keyToFind
; returns null if not foundCopyright © 2016–2020. All rights reserved.