2003-03-02 Miguel de Icaza <miguel@ximian.com>
* glib/Markup.cs: Add new file. svn path=/trunk/gtk-sharp/; revision=12114
This commit is contained in:
parent
e0bb987aa5
commit
e547fa0e3f
2 changed files with 31 additions and 0 deletions
|
@ -1,3 +1,7 @@
|
||||||
|
2003-03-02 Miguel de Icaza <miguel@ximian.com>
|
||||||
|
|
||||||
|
* glib/Markup.cs: Add new file.
|
||||||
|
|
||||||
2003-03-01 Peter Williams <peterw@ximian.com>
|
2003-03-01 Peter Williams <peterw@ximian.com>
|
||||||
|
|
||||||
* glue/Makefile.am (libgtksharpglue_la_LIBADD): Change this to
|
* glue/Makefile.am (libgtksharpglue_la_LIBADD): Change this to
|
||||||
|
|
27
glib/Markup.cs
Normal file
27
glib/Markup.cs
Normal file
|
@ -0,0 +1,27 @@
|
||||||
|
//
|
||||||
|
// 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);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
Loading…
Add table
Reference in a new issue