Questions tagged [string-utils]

50 questions
-1
votes
1 answer

"Cannot find symbol"?

I am really going beserk here. I am trying to reverse the words in a string. I am trying to use StringUtils and have done the import. Why do I get and "Cannot find symbol. Method..."? Here is my code: /* * To change this template, choose Tools |…
Morten
  • 47
  • 1
  • 6
  • 12
-1
votes
1 answer

isBlank method to test string without space StringUtils.isBlank(" ") = false;

Hi I found this method is StringUtils.isBlank() I'm using JDK 1.8.51 I'm not able to found it there is any jar to download to have it? thanks
YK mar
  • 669
  • 2
  • 10
  • 32
-2
votes
2 answers

How to convert a String into HashMap?

I have receive string String message = "Value{A=10,B=20,C=30,D=700-2-1, Bourke STREET, SOUTH 2/28 QUEEN ST,E=40,F=50}"; Map = { A = 10 , B = 20 C = 30 D = 700-2-1, Bourke STREET, SOUTH 100/28 QUEEN ST …
Karthik
  • 1
  • 1
-2
votes
1 answer

How to make conditions StringUtils less than specific character in Java

I wrote a String class that masking username something like; input --> Johny Holloway expecting output ---> J***y H***y and its working. However I like to change my code if user input name and surname less than 3 character example; Name BR --->…
-4
votes
2 answers

Difference in behaviour between String.replaceAll() and StringUtils.replace()

I want to replace all single quotes with escaped single quotes. First I have tried with String.replaceAll("\'", "\\'") but it didn't worked. So, I have tried with StringUtils.replace(String, "\'", "\\'") which worked. Here is the code: String…
Kruti Patel
  • 1,422
  • 2
  • 23
  • 36
1 2 3
4