Tabnine Logo
String.indexAndLength
Code IndexAdd Tabnine to your IDE (free)

How to use
indexAndLength
method
in
java.lang.String

Best Java code snippets using java.lang.String.indexAndLength (Showing top 20 results out of 315)

origin: robovm/robovm

/**
 * Returns the character at the specified offset in this string.
 *
 * @param index
 *            the zero-based index in this string.
 * @return the character at the index.
 * @throws IndexOutOfBoundsException
 *             if {@code index < 0} or {@code index >= length()}.
 */
public char charAt(int index) {
  if (index < 0 || index >= count) {
    throw indexAndLength(index);
  }
  return value[offset + index];
}
origin: robovm/robovm

/**
 * Returns the Unicode code point at the given {@code index}.
 *
 * @throws IndexOutOfBoundsException if {@code index < 0 || index >= length()}
 * @see Character#codePointAt(char[], int, int)
 * @since 1.5
 */
public int codePointAt(int index) {
  if (index < 0 || index >= count) {
    throw indexAndLength(index);
  }
  return Character.codePointAt(value, offset + index, offset + count);
}
origin: robovm/robovm

/**
 * Returns a string containing a suffix of this string. The returned string
 * shares this string's <a href="#backing_array">backing array</a>.
 *
 * @param start
 *            the offset of the first character.
 * @return a new string containing the characters from start to the end of
 *         the string.
 * @throws IndexOutOfBoundsException
 *             if {@code start < 0} or {@code start > length()}.
 */
public String substring(int start) {
  if (start == 0) {
    return this;
  }
  if (start >= 0 && start <= count) {
    return new String(offset + start, count - start, value);
  }
  throw indexAndLength(start);
}
origin: robovm/robovm

/**
 * Returns the Unicode code point that precedes the given {@code index}.
 *
 * @throws IndexOutOfBoundsException if {@code index < 1 || index > length()}
 * @see Character#codePointBefore(char[], int, int)
 * @since 1.5
 */
public int codePointBefore(int index) {
  if (index < 1 || index > count) {
    throw indexAndLength(index);
  }
  return Character.codePointBefore(value, offset + index, offset);
}
origin: MobiVM/robovm

/**
 * Returns the character at the specified offset in this string.
 *
 * @param index
 *            the zero-based index in this string.
 * @return the character at the index.
 * @throws IndexOutOfBoundsException
 *             if {@code index < 0} or {@code index >= length()}.
 */
public char charAt(int index) {
  if (index < 0 || index >= count) {
    throw indexAndLength(index);
  }
  return value[offset + index];
}
origin: com.gluonhq/robovm-rt

/**
 * Returns the character at the specified offset in this string.
 *
 * @param index
 *            the zero-based index in this string.
 * @return the character at the index.
 * @throws IndexOutOfBoundsException
 *             if {@code index < 0} or {@code index >= length()}.
 */
public char charAt(int index) {
  if (index < 0 || index >= count) {
    throw indexAndLength(index);
  }
  return value[offset + index];
}
origin: com.bugvm/bugvm-rt

/**
 * Returns the character at the specified offset in this string.
 *
 * @param index
 *            the zero-based index in this string.
 * @return the character at the index.
 * @throws IndexOutOfBoundsException
 *             if {@code index < 0} or {@code index >= length()}.
 */
public char charAt(int index) {
  if (index < 0 || index >= count) {
    throw indexAndLength(index);
  }
  return value[offset + index];
}
origin: ibinti/bugvm

/**
 * Returns the character at the specified offset in this string.
 *
 * @param index
 *            the zero-based index in this string.
 * @return the character at the index.
 * @throws IndexOutOfBoundsException
 *             if {@code index < 0} or {@code index >= length()}.
 */
public char charAt(int index) {
  if (index < 0 || index >= count) {
    throw indexAndLength(index);
  }
  return value[offset + index];
}
origin: com.gluonhq/robovm-rt

/**
 * Returns the Unicode code point at the given {@code index}.
 *
 * @throws IndexOutOfBoundsException if {@code index < 0 || index >= length()}
 * @see Character#codePointAt(char[], int, int)
 * @since 1.5
 */
public int codePointAt(int index) {
  if (index < 0 || index >= count) {
    throw indexAndLength(index);
  }
  return Character.codePointAt(value, offset + index, offset + count);
}
origin: ibinti/bugvm

/**
 * Returns the Unicode code point at the given {@code index}.
 *
 * @throws IndexOutOfBoundsException if {@code index < 0 || index >= length()}
 * @see Character#codePointAt(char[], int, int)
 * @since 1.5
 */
public int codePointAt(int index) {
  if (index < 0 || index >= count) {
    throw indexAndLength(index);
  }
  return Character.codePointAt(value, offset + index, offset + count);
}
origin: com.bugvm/bugvm-rt

/**
 * Returns the Unicode code point at the given {@code index}.
 *
 * @throws IndexOutOfBoundsException if {@code index < 0 || index >= length()}
 * @see Character#codePointAt(char[], int, int)
 * @since 1.5
 */
public int codePointAt(int index) {
  if (index < 0 || index >= count) {
    throw indexAndLength(index);
  }
  return Character.codePointAt(value, offset + index, offset + count);
}
origin: MobiVM/robovm

/**
 * Returns the Unicode code point at the given {@code index}.
 *
 * @throws IndexOutOfBoundsException if {@code index < 0 || index >= length()}
 * @see Character#codePointAt(char[], int, int)
 * @since 1.5
 */
public int codePointAt(int index) {
  if (index < 0 || index >= count) {
    throw indexAndLength(index);
  }
  return Character.codePointAt(value, offset + index, offset + count);
}
origin: com.mobidevelop.robovm/robovm-rt

/**
 * Returns the Unicode code point at the given {@code index}.
 *
 * @throws IndexOutOfBoundsException if {@code index < 0 || index >= length()}
 * @see Character#codePointAt(char[], int, int)
 * @since 1.5
 */
public int codePointAt(int index) {
  if (index < 0 || index >= count) {
    throw indexAndLength(index);
  }
  return Character.codePointAt(value, offset + index, offset + count);
}
origin: FlexoVM/flexovm

/**
 * Returns the Unicode code point at the given {@code index}.
 *
 * @throws IndexOutOfBoundsException if {@code index < 0 || index >= length()}
 * @see Character#codePointAt(char[], int, int)
 * @since 1.5
 */
public int codePointAt(int index) {
  if (index < 0 || index >= count) {
    throw indexAndLength(index);
  }
  return Character.codePointAt(value, offset + index, offset + count);
}
origin: MobiVM/robovm

/**
 * Returns the Unicode code point that precedes the given {@code index}.
 *
 * @throws IndexOutOfBoundsException if {@code index < 1 || index > length()}
 * @see Character#codePointBefore(char[], int, int)
 * @since 1.5
 */
public int codePointBefore(int index) {
  if (index < 1 || index > count) {
    throw indexAndLength(index);
  }
  return Character.codePointBefore(value, offset + index, offset);
}
origin: com.bugvm/bugvm-rt

/**
 * Returns the Unicode code point that precedes the given {@code index}.
 *
 * @throws IndexOutOfBoundsException if {@code index < 1 || index > length()}
 * @see Character#codePointBefore(char[], int, int)
 * @since 1.5
 */
public int codePointBefore(int index) {
  if (index < 1 || index > count) {
    throw indexAndLength(index);
  }
  return Character.codePointBefore(value, offset + index, offset);
}
origin: FlexoVM/flexovm

/**
 * Returns the Unicode code point that precedes the given {@code index}.
 *
 * @throws IndexOutOfBoundsException if {@code index < 1 || index > length()}
 * @see Character#codePointBefore(char[], int, int)
 * @since 1.5
 */
public int codePointBefore(int index) {
  if (index < 1 || index > count) {
    throw indexAndLength(index);
  }
  return Character.codePointBefore(value, offset + index, offset);
}
origin: com.gluonhq/robovm-rt

/**
 * Returns the Unicode code point that precedes the given {@code index}.
 *
 * @throws IndexOutOfBoundsException if {@code index < 1 || index > length()}
 * @see Character#codePointBefore(char[], int, int)
 * @since 1.5
 */
public int codePointBefore(int index) {
  if (index < 1 || index > count) {
    throw indexAndLength(index);
  }
  return Character.codePointBefore(value, offset + index, offset);
}
origin: ibinti/bugvm

/**
 * Returns the Unicode code point that precedes the given {@code index}.
 *
 * @throws IndexOutOfBoundsException if {@code index < 1 || index > length()}
 * @see Character#codePointBefore(char[], int, int)
 * @since 1.5
 */
public int codePointBefore(int index) {
  if (index < 1 || index > count) {
    throw indexAndLength(index);
  }
  return Character.codePointBefore(value, offset + index, offset);
}
origin: com.mobidevelop.robovm/robovm-rt

/**
 * Returns the Unicode code point that precedes the given {@code index}.
 *
 * @throws IndexOutOfBoundsException if {@code index < 1 || index > length()}
 * @see Character#codePointBefore(char[], int, int)
 * @since 1.5
 */
public int codePointBefore(int index) {
  if (index < 1 || index > count) {
    throw indexAndLength(index);
  }
  return Character.codePointBefore(value, offset + index, offset);
}
java.langStringindexAndLength

Popular methods of String

  • equals
  • length
    Returns the number of characters in this string.
  • substring
    Returns a string containing a subsequence of characters from this string. The returned string shares
  • startsWith
    Compares the specified string to this string, starting at the specified offset, to determine if the
  • format
    Returns a formatted string, using the supplied format and arguments, localized to the given locale.
  • split
    Splits this string using the supplied regularExpression. See Pattern#split(CharSequence,int) for an
  • trim
  • valueOf
    Creates a new string containing the specified characters in the character array. Modifying the chara
  • indexOf
  • endsWith
    Compares the specified string to this string to determine if the specified string is a suffix.
  • toLowerCase
    Converts this string to lower case, using the rules of locale.Most case mappings are unaffected by t
  • contains
    Determines if this String contains the sequence of characters in the CharSequence passed.
  • toLowerCase,
  • contains,
  • getBytes,
  • <init>,
  • equalsIgnoreCase,
  • replace,
  • isEmpty,
  • charAt,
  • hashCode,
  • lastIndexOf

Popular in Java

  • Making http requests using okhttp
  • getOriginalFilename (MultipartFile)
    Return the original filename in the client's filesystem.This may contain path information depending
  • getResourceAsStream (ClassLoader)
  • orElseThrow (Optional)
    Return the contained value, if present, otherwise throw an exception to be created by the provided s
  • Runnable (java.lang)
    Represents a command that can be executed. Often used to run code in a different Thread.
  • Socket (java.net)
    Provides a client-side TCP socket.
  • TreeSet (java.util)
    TreeSet is an implementation of SortedSet. All optional operations (adding and removing) are support
  • Modifier (javassist)
    The Modifier class provides static methods and constants to decode class and member access modifiers
  • SSLHandshakeException (javax.net.ssl)
    The exception that is thrown when a handshake could not be completed successfully.
  • Servlet (javax.servlet)
    Defines methods that all servlets must implement. A servlet is a small Java program that runs within
  • Top Sublime Text plugins
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogTabnine AcademyTerms of usePrivacy policyJava Code IndexJavascript Code Index
Get Tabnine for your IDE now