Skip to content

Commit

Permalink
code cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
xzel23 committed Nov 28, 2023
1 parent 55e42f5 commit 34d803e
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions utility/src/main/java/com/dua3/utility/text/RichText.java
Original file line number Diff line number Diff line change
Expand Up @@ -201,7 +201,7 @@ public static boolean textAndFontEquals(@Nullable RichText a, @Nullable RichText
return true;
}

if (a == null || b == null || !a.equalsText(b)) {
if (a == null || !a.equalsText(b)) {
return false;
}

Expand Down Expand Up @@ -615,11 +615,11 @@ public RichText subSequence(int start, int end) {
/**
* Get a sub range of this instance.
*
* @param begin begin index (inclusive)
* @param start start index (inclusive)
* @return RichText instance of the sub range from beginIndex to the end
*/
public RichText subSequence(int begin) {
return subSequence(begin, length());
public RichText subSequence(int start) {
return subSequence(start, length());
}

@Override
Expand Down Expand Up @@ -653,7 +653,7 @@ public RichText trim() {
}

private boolean isSimpleWhitespace(char ch) {
return ch <= '\u0020';
return ch <= ' ';
}

/**
Expand Down Expand Up @@ -700,7 +700,7 @@ public RichText stripTrailing() {
return subSequence(0, len);
}

private boolean isWhitespace(char ch) {
private static boolean isWhitespace(char ch) {
return Character.isWhitespace(ch);
}

Expand Down

0 comments on commit 34d803e

Please sign in to comment.