iTextSharp.text.pdf.fonts.cmaps.CMapToUnicode.ConvertToInt C# (CSharp) Method

ConvertToInt() private method

private ConvertToInt ( String s ) : int
s String
return int
        private int ConvertToInt(String s)
        {
            UnicodeEncoding ue = new UnicodeEncoding(true, false);
            byte[] b = ue.GetBytes(s);
            int value = 0;
            for (int i = 0; i < b.Length - 1; i++) {
                value += b[i] & 0xff;
                value <<= 8;
            }
            value += b[b.Length - 1] & 0xff;
            return value;
        }