Java Utililty Methods String Line Separator

List of utility methods to do String Line Separator

  1. HOME
  2. Java
  3. S
  4. String Line Separator

Description

The list of methods to do String Line Separator are organized into topic(s).

Method

int getLineAtOffset(String text, int offset)
get Line At Offset
int line = 1;
for (int i = 0; i < offset; i++) {
 if (text.charAt(i) == '\n') {
 line++;
return line;

AltStyle によって変換されたページ (->オリジナル) /