Java tutorial
//package com.java2s; public class Main { private static int iAt(String s, int index) { if (index < s.length()) { return (((int) s.charAt(index)) & 0xff); } else { return -1; } } }