Languages
[Edit]
EN

Java - remove prefix from string

0 points
Created by:
Wallace
636

In this article, we would like to show you how to remove prefix from string in Java.

Quick solution:

 

Practical examples

Edit

1. String replaceAll() with regex

Edit

In this example, we use replaceAll() method with regex to replace the first two letters (AB) with an empty string.

2. String substring()

Edit

In this example, we use substring() method to remove first two letters from the text.

1
Donate to Dirask
Our content is created by volunteers - like Wikipedia. If you think, the things we do are good, donate us. Thanks!
Join to our subscribers to be up to date with content, news and offers.

Java - String (popular problems)

Java - remove prefix from string
Native Advertising
🚀
Get your tech brand or product in front of software developers.
For more information Contact us
Dirask - we help you to
solve coding problems.
Ask question.

❤️💻 🙂

Join