mirror of
https://github.com/Ryujinx/GtkSharp.git
synced 2024-12-26 16:35:27 +00:00
e547fa0e3f
* glib/Markup.cs: Add new file. svn path=/trunk/gtk-sharp/; revision=12114
28 lines
480 B
C#
28 lines
480 B
C#
//
|
|
// Markup.cs: Wrapper for the Markup code in Glib
|
|
//
|
|
// Authors:
|
|
// Miguel de Icaza (miguel@ximian.com)
|
|
//
|
|
// (C) 2003 Ximian, Inc.
|
|
//
|
|
using System;
|
|
using System.Runtime.InteropServices;
|
|
|
|
namespace GLib {
|
|
|
|
|
|
public class Markup {
|
|
[DllImport("libglib-2.0-0.dll")]
|
|
static extern string g_markup_escape_text (string text, int len);
|
|
|
|
static public string EscapeText (string s)
|
|
{
|
|
if (s == null)
|
|
return "";
|
|
|
|
return g_markup_escape_text (s, s.Length);
|
|
}
|
|
}
|
|
}
|