سؤال

What is the best way to parse a String value that looks like this id#1 ...id#398, so I can get de number after the id# String in JAVA.

هل كانت مفيدة؟

المحلول

If id# is a fixed prefix in every ID, I would have used

stringValue.split("id#")[0]
مرخصة بموجب: CC-BY-SA مع الإسناد
لا تنتمي إلى StackOverflow
scroll top