Bookmark Topic Watch Topic
  • New Topic

how to compare two strings having first few charaters common?  RSS feed

 
tej ku
Greenhorn
Posts: 19
  • Mark post as helpful
  • send pies
  • Report post to moderator
Hi
I have
string1 = "caselevelno"
string2 = "caselevelnoversion1"

string2 has more charaters than string1

How to compare and verify that string2 starts with string1 value.?
Regards,
Ravi.
 
Hunter McMillen
Ranch Hand
Posts: 492
Firefox Browser Linux VI Editor
  • Mark post as helpful
  • send pies
  • Report post to moderator
There are some methods in the String api that you would find useful for this:
String API


-Hunter

 
Jesper de Jong
Java Cowboy
Sheriff
Posts: 16057
88
Android IntelliJ IDE Java Scala Spring
  • Mark post as helpful
  • send pies
  • Report post to moderator
Please do not ask the same question in more than one forum - CarefullyChooseOneForum

I am closing this copy, continue in the other copy.
 
    Bookmark Topic Watch Topic
  • New Topic
Boost this thread!