Example #1
0
        /**
         * Create a list of Erlang integers representing Unicode codePoints.
         * This method does not check if the string contains valid code points.
         *
         * @param str
         *            the characters from which to create the list.
         */
        public OtpErlangList(String str)
        {
            if (str == null || str.Length == 0)
            {
                elems = NO_ELEMENTS;
            }
            else
            {

                elems = new OtpErlangObject[str.Length];
                for (int i = 0; i < elems.Length; i++)
                {
                    elems[i] = new OtpErlangInt(str[i]);
                }
            }
        }
Example #2
0
 /**
  * Create a list of Erlang integers representing Unicode codePoints.
  * This method does not check if the string contains valid code points.
  *
  * @param str
  *            the characters from which to create the list.
  */
 public OtpErlangList(String str)
 {
     if (str == null || str.Length == 0)
     {
         elems = NO_ELEMENTS;
     }
     else
     {
         int[] codePoints = OtpErlangString.stringToCodePoints(str);
         elems = new OtpErlangObject[codePoints.Length];
         for (int i = 0; i < elems.Length; i++)
         {
             elems[i] = new OtpErlangInt(codePoints[i]);
         }
     }
 }