GeezerVisonThe World Wide Web, restored to 800 pixels of glory. |
| Home|About|Gaming cabinet|Archives|How it works|Starter sites |
GeezerVison is showing www.geeksforgeeks.org — StringBuffer offsetByCodePoints() method in Java with Examples - GeeksforGeeks StringBuffer offsetByCodePoints() method in Java with ExamplesLast Updated : 4 Dec, 2018 The offsetByCodePoints() method of StringBuffer class returns the index within this String contained by StringBuffer that is offset from the index passed as parameter by codePointOffset code points. Unpaired surrogates lies between index and codePointOffset count as one code point each.
Syntax:
public int offsetByCodePoints(int index,
int codePointOffset)
Parameters: This method takes two parameters:
Output:
Example 2:
String = WelcomeGeeks Index = 5
Output:
Example 3: To demonstrate IndexOutOfBoundException
String = India Is great Index = 11
Output:
Reference:
https://docs.oracle.com/javase/10/docs/api/java/lang/StringBuffer.html#offsetByCodePoints(int, int)Exception: java.lang.IndexOutOfBoundsException Comment Explore |
| You are visitor 01402503 — GeezerVison does not store the pages you look up. Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required. |