LAs Posted November 6, 2013 Share Posted November 6, 2013 Hello guys, i need some basic info here. I need to build string, which must be builded into "'%name%'", when name is a variable. Using concat, its easy to do that:String myString = "'%" + name + "%'";how to do that with String.format() ?I`m trying to do like: String myString = String.format("'%%s%'", name); << it appears a problem with "%'" tag. how to avoid that ? How to use double %`s in the quotas ?Any suggestions ? Linas. Link to comment Share on other sites More sharing options...
justsomeguy Posted November 6, 2013 Share Posted November 6, 2013 Using %% will represent a % character. 1 Link to comment Share on other sites More sharing options...
LAs Posted November 6, 2013 Author Share Posted November 6, 2013 Using %% will represent a % character. exactly, after this post, i found this on other forum, but thanks anywhere. Just came here to leave agreement with you Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now