vala r2062 - in trunk: . vapi
- From: juergbi svn gnome org
- To: svn-commits-list gnome org
- Subject: vala r2062 - in trunk: . vapi
- Date: Mon, 24 Nov 2008 15:13:41 +0000 (UTC)
Author: juergbi
Date: Mon Nov 24 15:13:41 2008
New Revision: 2062
URL: http://svn.gnome.org/viewvc/vala?rev=2062&view=rev
Log:
2008-11-24 JÃrg Billeter <j bitron ch>
* vapi/glib-2.0.vapi:
Add string.replace method, patch by Ali Sabil
Modified:
trunk/ChangeLog
trunk/vapi/glib-2.0.vapi
Modified: trunk/vapi/glib-2.0.vapi
==============================================================================
--- trunk/vapi/glib-2.0.vapi (original)
+++ trunk/vapi/glib-2.0.vapi Mon Nov 24 15:13:41 2008
@@ -796,6 +796,15 @@
/* internal method */
public string substring (long offset, long len);
+ public string replace (string old, string replacement) {
+ try {
+ var regex = new GLib.Regex (GLib.Regex.escape_string (old));
+ return regex.replace_literal (this, -1, 0, replacement);
+ } catch (GLib.RegexError e) {
+ GLib.assert_not_reached ();
+ }
+ }
+
public long length {
get { return this.len (); }
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]