Languages
[Edit]
PL

Java - Usuwanie ostatnich 2 znaków ze StringBuilder

0 points
Created by:
Dirask Community
5580

Usuń ostatnie 2 znaki z StringBuilder w Javie

Składnia:

sb.delete(sb.length() - 2, sb.length());

Przykład:

StringBuilder sb = new StringBuilder();
sb.append("12345");
System.out.println(sb.toString()); // 12345
sb.delete(sb.length() - 2, sb.length());
System.out.println(sb.toString()); // 123

https://docs.oracle.com/javase/8/docs/api/java/lang/StringBuilder.html

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