1 19 20 package org.netbeans.api.lexer; 21 22 import org.netbeans.lib.editor.util.CharSequenceUtilities; 23 24 30 31 public final class TokenUtilities { 32 33 private TokenUtilities() { 34 } 36 37 46 public static boolean equals(CharSequence text1, CharSequence text2) { 47 return CharSequenceUtilities.textEquals(text1, text2); 48 } 49 50 53 public static int indexOf(CharSequence text, int ch) { 54 return CharSequenceUtilities.indexOf(text, ch); 55 } 56 57 60 public static int indexOf(CharSequence text, int ch, int fromIndex) { 61 return CharSequenceUtilities.indexOf(text, ch, fromIndex); 62 } 63 64 67 public static int indexOf(CharSequence text, CharSequence seq) { 68 return CharSequenceUtilities.indexOf(text, seq); 69 } 70 71 74 public static int indexOf(CharSequence text, CharSequence seq, int fromIndex) { 75 return CharSequenceUtilities.indexOf(text, seq, fromIndex); 76 } 77 78 81 public static int lastIndexOf(CharSequence text, CharSequence seq) { 82 return CharSequenceUtilities.lastIndexOf(text, seq); 83 } 84 85 88 public static int lastIndexOf(CharSequence text, CharSequence seq, int fromIndex) { 89 return CharSequenceUtilities.lastIndexOf(text, seq, fromIndex); 90 } 91 92 95 public static int lastIndexOf(CharSequence text, int ch) { 96 return CharSequenceUtilities.lastIndexOf(text, ch); 97 } 98 99 102 public static int lastIndexOf(CharSequence text, int ch, int fromIndex) { 103 return CharSequenceUtilities.lastIndexOf(text, ch, fromIndex); 104 } 105 106 109 public static boolean startsWith(CharSequence text, CharSequence prefix) { 110 return CharSequenceUtilities.startsWith(text, prefix); 111 } 112 113 116 public static boolean endsWith(CharSequence text, CharSequence suffix) { 117 return CharSequenceUtilities.endsWith(text, suffix); 118 } 119 120 123 public static CharSequence trim(CharSequence text) { 124 return CharSequenceUtilities.trim(text); 125 } 126 127 134 public static String debugText(CharSequence text) { 135 return CharSequenceUtilities.debugText(text); 136 } 137 138 } 139 | Popular Tags |