Пример #1
0
        /// <summary>Encode codepoint into utf8 text (char array length returned as parameter)</summary>
        public static string CodepointToUTF8(int codepoint, ref int byteSize)
        {
            fixed(int *l1 = &byteSize)
            {
                var ptr = CodepointToUTF8(codepoint, l1);

                return(Utf8StringUtils.GetUTF8String(ptr));
            }
        }
Пример #2
0
        /// <summary>Encode codepoint into utf8 text (char array length returned as parameter)</summary>
        public static string TextCodepointsToUTF8(int[] codepoints, int length)
        {
            fixed(int *c1 = codepoints)
            {
                var ptr  = TextCodepointsToUTF8(c1, length);
                var text = Utf8StringUtils.GetUTF8String(ptr);

                MemFree(ptr);
                return(text);
            }
        }
Пример #3
0
 /// <summary>Get Pascal case notation version of provided string</summary>
 public static string TextToPascal(string text)
 {
     using var str1 = text.ToUTF8Buffer();
     return(Utf8StringUtils.GetUTF8String(TextToPascal(str1.AsPointer())));
 }
Пример #4
0
 /// <summary>Get clipboard text content</summary>
 public static string GetClipboardText_()
 {
     return(Utf8StringUtils.GetUTF8String(GetClipboardText()));
 }
Пример #5
0
 /// <summary>Get the human-readable, UTF-8 encoded name of the primary monitor</summary>
 public static string GetMonitorName_(int monitor)
 {
     return(Utf8StringUtils.GetUTF8String(GetMonitorName(monitor)));
 }
Пример #6
0
 /// <summary>Return gamepad internal name id</summary>
 public static string GetGamepadName_(int gamepad)
 {
     return(Utf8StringUtils.GetUTF8String(GetGamepadName(gamepad)));
 }