Create() 공개 정적인 메소드

public static Create ( int capacity ) : CString8*
capacity int
리턴 CString8*
예제 #1
0
        /// <summary>
        /// Converts character to an ascii c like string representation.
        /// If unicode character is outside the range of an Ascii
        /// character then Convert.NonAsciiCharacter is returned.
        /// </summary>
        /// <param name="value">char to be converted</param>
        /// <returns></returns>
        public unsafe static CString8 *ToCString8(char value)
        {
            CString8 *str1 = CString8.Create(1);

            str1->SetChar(0, ToAscii(value));
            return(str1);
        }
예제 #2
0
        /// <summary>
        /// Converts string to its ascii representation terminating with
        /// null.  If unicode character is outside the range of an Ascii
        /// character then Convert.NonAsciiCharacter is returned in its
        /// place.
        /// </summary>
        /// <param name="value"></param>
        /// <returns></returns>
        public unsafe static CString8 *ToCString8(string value)
        {
            CString8 *str1 = CString8.Create(value.Length);

            for (int x = 0; x < value.Length; x++)
            {
                str1->SetChar(x, ToAscii(value [x]));
            }
            return(str1);
        }