LAs 0 Posted November 6, 2013 Report 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. Quote Link to post Share on other sites
justsomeguy 1,135 Posted November 6, 2013 Report Share Posted November 6, 2013 Using %% will represent a % character. 1 Quote Link to post Share on other sites
LAs 0 Posted November 6, 2013 Author Report 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 Quote Link to post Share on other sites
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.