gio2 0.90.5-x86-mingw32 → 0.90.6-x86-mingw32
Sign up to get free protection for your applications and to get access to all the features.
- data/ChangeLog +41 -0
- data/Rakefile +9 -70
- data/ext/gio2/extconf.rb +9 -9
- data/ext/gio2/gasyncinitable.c +0 -1
- data/ext/gio2/gbufferedinputstream.c +0 -19
- data/ext/gio2/gbufferedoutputstream.c +0 -34
- data/ext/gio2/gcharsetconverter.c +0 -17
- data/ext/gio2/gcontenttype.c +1 -8
- data/ext/gio2/gconverterinputstream.c +0 -7
- data/ext/gio2/gconverteroutputstream.c +0 -7
- data/ext/gio2/gdatainputstream.c +34 -57
- data/ext/gio2/gdataoutputstream.c +0 -18
- data/ext/gio2/gdesktopappinfo.c +0 -2
- data/ext/gio2/gemblem.c +0 -19
- data/ext/gio2/gfile.c +4 -6
- data/ext/gio2/gfileattribute.c +3 -155
- data/ext/gio2/gfileattributeinfo.c +89 -0
- data/ext/gio2/gfileattributeinfolist.c +109 -0
- data/ext/gio2/gfileenumerator.c +0 -2
- data/ext/gio2/gfileicon.c +0 -7
- data/ext/gio2/gfileinfo.c +4 -11
- data/ext/gio2/gfileinputstream.c +0 -2
- data/ext/gio2/gfileiostream.c +0 -2
- data/ext/gio2/gfilemonitor.c +0 -19
- data/ext/gio2/gfileoutputstream.c +1 -5
- data/ext/gio2/gfilterinputstream.c +1 -30
- data/ext/gio2/gfilteroutputstream.c +1 -30
- data/ext/gio2/gicon.c +0 -2
- data/ext/gio2/ginetaddress.c +0 -72
- data/ext/gio2/ginetsocketaddress.c +0 -16
- data/ext/gio2/ginputstream.c +0 -2
- data/ext/gio2/gio2.c +11 -1
- data/ext/gio2/gio2.h +9 -1
- data/ext/gio2/gioerror.c +4 -1
- data/ext/gio2/giomodule.c +2 -2
- data/ext/gio2/gioscheduler.c +4 -6
- data/ext/gio2/giostream.c +0 -23
- data/ext/gio2/gloadableicon.c +0 -1
- data/ext/gio2/gmemoryoutputstream.c +0 -24
- data/ext/gio2/gmount.c +1 -0
- data/ext/gio2/gmountoperation.c +1 -103
- data/ext/gio2/gnetworkaddress.c +0 -14
- data/ext/gio2/gnetworkservice.c +0 -21
- data/ext/gio2/goutputstream.c +8 -18
- data/ext/gio2/gresolver.c +0 -2
- data/ext/gio2/gsocket.c +2 -80
- data/ext/gio2/gsocketaddress.c +1 -13
- data/ext/gio2/gsocketclient.c +0 -68
- data/ext/gio2/gsocketconnection.c +1 -8
- data/ext/gio2/gsocketcontrolmessage.c +0 -2
- data/ext/gio2/gsocketlistener.c +27 -21
- data/ext/gio2/gtcpconnection.c +1 -22
- data/ext/gio2/gthreadedsocketservice.c +6 -5
- data/ext/gio2/gunixfdlist.c +1 -1
- data/ext/gio2/gunixfdmessage.c +0 -9
- data/ext/gio2/gunixinputstream.c +0 -24
- data/ext/gio2/gunixmounts.c +1 -4
- data/ext/gio2/gunixoutputstream.c +0 -24
- data/ext/gio2/gunixsocketaddress.c +5 -17
- data/ext/gio2/gvfs.c +0 -2
- data/ext/gio2/gvolumemonitor.c +0 -2
- data/ext/gio2/gzlibcompressor.c +3 -0
- data/ext/gio2/util.c +3 -0
- data/lib/1.8/gio2.so +0 -0
- data/lib/1.9/gio2.so +0 -0
- data/lib/gio2.rb +19 -1
- data/test/load-test.rb +14 -0
- data/test/test_bufferedinputstream.rb +2 -0
- data/test/test_charsetconverter.rb +2 -0
- data/test/test_datainputstream.rb +7 -0
- data/test/test_fileenumerator.rb +8 -0
- data/test/test_filemonitor.rb +2 -0
- data/test/test_inetaddress.rb +8 -0
- metadata +90 -835
- data/vendor/local/bin/envsubst.exe +0 -0
- data/vendor/local/bin/gettext.exe +0 -0
- data/vendor/local/bin/gettext.sh +0 -123
- data/vendor/local/bin/glib-genmarshal.exe +0 -0
- data/vendor/local/bin/glib-gettextize +0 -188
- data/vendor/local/bin/glib-mkenums +0 -537
- data/vendor/local/bin/gobject-query.exe +0 -0
- data/vendor/local/bin/gspawn-win32-helper-console.exe +0 -0
- data/vendor/local/bin/gspawn-win32-helper.exe +0 -0
- data/vendor/local/bin/intl.dll +0 -0
- data/vendor/local/bin/libasprintf-0.dll +0 -0
- data/vendor/local/bin/libgcc_s_dw2-1.dll +0 -0
- data/vendor/local/bin/libgio-2.0-0.dll +0 -0
- data/vendor/local/bin/libglib-2.0-0.dll +0 -0
- data/vendor/local/bin/libgmodule-2.0-0.dll +0 -0
- data/vendor/local/bin/libgobject-2.0-0.dll +0 -0
- data/vendor/local/bin/libgthread-2.0-0.dll +0 -0
- data/vendor/local/bin/ngettext.exe +0 -0
- data/vendor/local/include/autosprintf.h +0 -66
- data/vendor/local/include/glib-2.0/gio/gappinfo.h +0 -236
- data/vendor/local/include/glib-2.0/gio/gasyncinitable.h +0 -119
- data/vendor/local/include/glib-2.0/gio/gasyncresult.h +0 -73
- data/vendor/local/include/glib-2.0/gio/gbufferedinputstream.h +0 -123
- data/vendor/local/include/glib-2.0/gio/gbufferedoutputstream.h +0 -81
- data/vendor/local/include/glib-2.0/gio/gcancellable.h +0 -103
- data/vendor/local/include/glib-2.0/gio/gcharsetconverter.h +0 -60
- data/vendor/local/include/glib-2.0/gio/gcontenttype.h +0 -57
- data/vendor/local/include/glib-2.0/gio/gconverter.h +0 -95
- data/vendor/local/include/glib-2.0/gio/gconverterinputstream.h +0 -79
- data/vendor/local/include/glib-2.0/gio/gconverteroutputstream.h +0 -79
- data/vendor/local/include/glib-2.0/gio/gcredentials.h +0 -76
- data/vendor/local/include/glib-2.0/gio/gdatainputstream.h +0 -150
- data/vendor/local/include/glib-2.0/gio/gdataoutputstream.h +0 -115
- data/vendor/local/include/glib-2.0/gio/gdbusaddress.h +0 -58
- data/vendor/local/include/glib-2.0/gio/gdbusauthobserver.h +0 -46
- data/vendor/local/include/glib-2.0/gio/gdbusconnection.h +0 -562
- data/vendor/local/include/glib-2.0/gio/gdbuserror.h +0 -100
- data/vendor/local/include/glib-2.0/gio/gdbusintrospection.h +0 -286
- data/vendor/local/include/glib-2.0/gio/gdbusmessage.h +0 -149
- data/vendor/local/include/glib-2.0/gio/gdbusmethodinvocation.h +0 -73
- data/vendor/local/include/glib-2.0/gio/gdbusnameowning.h +0 -112
- data/vendor/local/include/glib-2.0/gio/gdbusnamewatching.h +0 -94
- data/vendor/local/include/glib-2.0/gio/gdbusproxy.h +0 -167
- data/vendor/local/include/glib-2.0/gio/gdbusserver.h +0 -54
- data/vendor/local/include/glib-2.0/gio/gdbusutils.h +0 -44
- data/vendor/local/include/glib-2.0/gio/gdrive.h +0 -225
- data/vendor/local/include/glib-2.0/gio/gemblem.h +0 -58
- data/vendor/local/include/glib-2.0/gio/gemblemedicon.h +0 -62
- data/vendor/local/include/glib-2.0/gio/gfile.h +0 -1017
- data/vendor/local/include/glib-2.0/gio/gfileattribute.h +0 -77
- data/vendor/local/include/glib-2.0/gio/gfileenumerator.h +0 -132
- data/vendor/local/include/glib-2.0/gio/gfileicon.h +0 -56
- data/vendor/local/include/glib-2.0/gio/gfileinfo.h +0 -952
- data/vendor/local/include/glib-2.0/gio/gfileinputstream.h +0 -112
- data/vendor/local/include/glib-2.0/gio/gfileiostream.h +0 -118
- data/vendor/local/include/glib-2.0/gio/gfilemonitor.h +0 -95
- data/vendor/local/include/glib-2.0/gio/gfilenamecompleter.h +0 -76
- data/vendor/local/include/glib-2.0/gio/gfileoutputstream.h +0 -119
- data/vendor/local/include/glib-2.0/gio/gfilterinputstream.h +0 -76
- data/vendor/local/include/glib-2.0/gio/gfilteroutputstream.h +0 -76
- data/vendor/local/include/glib-2.0/gio/gicon.h +0 -91
- data/vendor/local/include/glib-2.0/gio/ginetaddress.h +0 -103
- data/vendor/local/include/glib-2.0/gio/ginetsocketaddress.h +0 -69
- data/vendor/local/include/glib-2.0/gio/ginitable.h +0 -96
- data/vendor/local/include/glib-2.0/gio/ginputstream.h +0 -172
- data/vendor/local/include/glib-2.0/gio/gio.h +0 -122
- data/vendor/local/include/glib-2.0/gio/gioenums.h +0 -1221
- data/vendor/local/include/glib-2.0/gio/gioenumtypes.h +0 -121
- data/vendor/local/include/glib-2.0/gio/gioerror.h +0 -52
- data/vendor/local/include/glib-2.0/gio/giomodule.h +0 -132
- data/vendor/local/include/glib-2.0/gio/gioscheduler.h +0 -52
- data/vendor/local/include/glib-2.0/gio/giostream.h +0 -112
- data/vendor/local/include/glib-2.0/gio/giotypes.h +0 -375
- data/vendor/local/include/glib-2.0/gio/gloadableicon.h +0 -97
- data/vendor/local/include/glib-2.0/gio/gmemoryinputstream.h +0 -82
- data/vendor/local/include/glib-2.0/gio/gmemoryoutputstream.h +0 -98
- data/vendor/local/include/glib-2.0/gio/gmount.h +0 -242
- data/vendor/local/include/glib-2.0/gio/gmountoperation.h +0 -123
- data/vendor/local/include/glib-2.0/gio/gnativevolumemonitor.h +0 -62
- data/vendor/local/include/glib-2.0/gio/gnetworkaddress.h +0 -73
- data/vendor/local/include/glib-2.0/gio/gnetworkservice.h +0 -71
- data/vendor/local/include/glib-2.0/gio/goutputstream.h +0 -207
- data/vendor/local/include/glib-2.0/gio/gpermission.h +0 -118
- data/vendor/local/include/glib-2.0/gio/gproxy.h +0 -123
- data/vendor/local/include/glib-2.0/gio/gproxyaddress.h +0 -76
- data/vendor/local/include/glib-2.0/gio/gproxyaddressenumerator.h +0 -75
- data/vendor/local/include/glib-2.0/gio/gproxyresolver.h +0 -96
- data/vendor/local/include/glib-2.0/gio/gresolver.h +0 -167
- data/vendor/local/include/glib-2.0/gio/gseekable.h +0 -99
- data/vendor/local/include/glib-2.0/gio/gsettings.h +0 -258
- data/vendor/local/include/glib-2.0/gio/gsettingsbackend.h +0 -138
- data/vendor/local/include/glib-2.0/gio/gsimpleasyncresult.h +0 -125
- data/vendor/local/include/glib-2.0/gio/gsimplepermission.h +0 -45
- data/vendor/local/include/glib-2.0/gio/gsocket.h +0 -194
- data/vendor/local/include/glib-2.0/gio/gsocketaddress.h +0 -79
- data/vendor/local/include/glib-2.0/gio/gsocketaddressenumerator.h +0 -89
- data/vendor/local/include/glib-2.0/gio/gsocketclient.h +0 -152
- data/vendor/local/include/glib-2.0/gio/gsocketconnectable.h +0 -74
- data/vendor/local/include/glib-2.0/gio/gsocketconnection.h +0 -91
- data/vendor/local/include/glib-2.0/gio/gsocketcontrolmessage.h +0 -105
- data/vendor/local/include/glib-2.0/gio/gsocketlistener.h +0 -138
- data/vendor/local/include/glib-2.0/gio/gsocketservice.h +0 -88
- data/vendor/local/include/glib-2.0/gio/gsrvtarget.h +0 -52
- data/vendor/local/include/glib-2.0/gio/gtcpconnection.h +0 -68
- data/vendor/local/include/glib-2.0/gio/gthemedicon.h +0 -63
- data/vendor/local/include/glib-2.0/gio/gthreadedsocketservice.h +0 -81
- data/vendor/local/include/glib-2.0/gio/gvfs.h +0 -125
- data/vendor/local/include/glib-2.0/gio/gvolume.h +0 -211
- data/vendor/local/include/glib-2.0/gio/gvolumemonitor.h +0 -150
- data/vendor/local/include/glib-2.0/gio/gzlibcompressor.h +0 -60
- data/vendor/local/include/glib-2.0/gio/gzlibdecompressor.h +0 -57
- data/vendor/local/include/glib-2.0/glib-object.h +0 -42
- data/vendor/local/include/glib-2.0/glib.h +0 -99
- data/vendor/local/include/glib-2.0/glib/galloca.h +0 -110
- data/vendor/local/include/glib-2.0/glib/garray.h +0 -179
- data/vendor/local/include/glib-2.0/glib/gasyncqueue.h +0 -120
- data/vendor/local/include/glib-2.0/glib/gatomic.h +0 -105
- data/vendor/local/include/glib-2.0/glib/gbacktrace.h +0 -68
- data/vendor/local/include/glib-2.0/glib/gbase64.h +0 -57
- data/vendor/local/include/glib-2.0/glib/gbitlock.h +0 -43
- data/vendor/local/include/glib-2.0/glib/gbookmarkfile.h +0 -215
- data/vendor/local/include/glib-2.0/glib/gcache.h +0 -69
- data/vendor/local/include/glib-2.0/glib/gchecksum.h +0 -86
- data/vendor/local/include/glib-2.0/glib/gcompletion.h +0 -81
- data/vendor/local/include/glib-2.0/glib/gconvert.h +0 -162
- data/vendor/local/include/glib-2.0/glib/gdataset.h +0 -122
- data/vendor/local/include/glib-2.0/glib/gdate.h +0 -263
- data/vendor/local/include/glib-2.0/glib/gdatetime.h +0 -217
- data/vendor/local/include/glib-2.0/glib/gdir.h +0 -52
- data/vendor/local/include/glib-2.0/glib/gerror.h +0 -98
- data/vendor/local/include/glib-2.0/glib/gfileutils.h +0 -128
- data/vendor/local/include/glib-2.0/glib/ghash.h +0 -166
- data/vendor/local/include/glib-2.0/glib/ghook.h +0 -181
- data/vendor/local/include/glib-2.0/glib/ghostutils.h +0 -40
- data/vendor/local/include/glib-2.0/glib/gi18n-lib.h +0 -38
- data/vendor/local/include/glib-2.0/glib/gi18n.h +0 -34
- data/vendor/local/include/glib-2.0/glib/giochannel.h +0 -366
- data/vendor/local/include/glib-2.0/glib/gkeyfile.h +0 -266
- data/vendor/local/include/glib-2.0/glib/glist.h +0 -120
- data/vendor/local/include/glib-2.0/glib/gmacros.h +0 -284
- data/vendor/local/include/glib-2.0/glib/gmain.h +0 -531
- data/vendor/local/include/glib-2.0/glib/gmappedfile.h +0 -49
- data/vendor/local/include/glib-2.0/glib/gmarkup.h +0 -163
- data/vendor/local/include/glib-2.0/glib/gmem.h +0 -309
- data/vendor/local/include/glib-2.0/glib/gmessages.h +0 -343
- data/vendor/local/include/glib-2.0/glib/gnode.h +0 -290
- data/vendor/local/include/glib-2.0/glib/goption.h +0 -370
- data/vendor/local/include/glib-2.0/glib/gpattern.h +0 -49
- data/vendor/local/include/glib-2.0/glib/gpoll.h +0 -117
- data/vendor/local/include/glib-2.0/glib/gprimes.h +0 -51
- data/vendor/local/include/glib-2.0/glib/gprintf.h +0 -52
- data/vendor/local/include/glib-2.0/glib/gqsort.h +0 -46
- data/vendor/local/include/glib-2.0/glib/gquark.h +0 -52
- data/vendor/local/include/glib-2.0/glib/gqueue.h +0 -127
- data/vendor/local/include/glib-2.0/glib/grand.h +0 -85
- data/vendor/local/include/glib-2.0/glib/gregex.h +0 -471
- data/vendor/local/include/glib-2.0/glib/grel.h +0 -101
- data/vendor/local/include/glib-2.0/glib/gscanner.h +0 -278
- data/vendor/local/include/glib-2.0/glib/gsequence.h +0 -128
- data/vendor/local/include/glib-2.0/glib/gshell.h +0 -55
- data/vendor/local/include/glib-2.0/glib/gslice.h +0 -86
- data/vendor/local/include/glib-2.0/glib/gslist.h +0 -114
- data/vendor/local/include/glib-2.0/glib/gspawn.h +0 -139
- data/vendor/local/include/glib-2.0/glib/gstdio.h +0 -147
- data/vendor/local/include/glib-2.0/glib/gstrfuncs.h +0 -269
- data/vendor/local/include/glib-2.0/glib/gstring.h +0 -178
- data/vendor/local/include/glib-2.0/glib/gtestutils.h +0 -297
- data/vendor/local/include/glib-2.0/glib/gthread.h +0 -407
- data/vendor/local/include/glib-2.0/glib/gthreadpool.h +0 -114
- data/vendor/local/include/glib-2.0/glib/gtimer.h +0 -65
- data/vendor/local/include/glib-2.0/glib/gtimezone.h +0 -44
- data/vendor/local/include/glib-2.0/glib/gtree.h +0 -91
- data/vendor/local/include/glib-2.0/glib/gtypes.h +0 -451
- data/vendor/local/include/glib-2.0/glib/gunicode.h +0 -421
- data/vendor/local/include/glib-2.0/glib/gurifuncs.h +0 -81
- data/vendor/local/include/glib-2.0/glib/gutils.h +0 -490
- data/vendor/local/include/glib-2.0/glib/gvariant.h +0 -248
- data/vendor/local/include/glib-2.0/glib/gvarianttype.h +0 -334
- data/vendor/local/include/glib-2.0/glib/gwin32.h +0 -114
- data/vendor/local/include/glib-2.0/gmodule.h +0 -101
- data/vendor/local/include/glib-2.0/gobject/gbinding.h +0 -136
- data/vendor/local/include/glib-2.0/gobject/gboxed.h +0 -248
- data/vendor/local/include/glib-2.0/gobject/gclosure.h +0 -251
- data/vendor/local/include/glib-2.0/gobject/genums.h +0 -261
- data/vendor/local/include/glib-2.0/gobject/gmarshal.h +0 -186
- data/vendor/local/include/glib-2.0/gobject/gobject.h +0 -567
- data/vendor/local/include/glib-2.0/gobject/gobjectnotifyqueue.c +0 -193
- data/vendor/local/include/glib-2.0/gobject/gparam.h +0 -415
- data/vendor/local/include/glib-2.0/gobject/gparamspecs.h +0 -1137
- data/vendor/local/include/glib-2.0/gobject/gsignal.h +0 -509
- data/vendor/local/include/glib-2.0/gobject/gsourceclosure.h +0 -51
- data/vendor/local/include/glib-2.0/gobject/gtype.h +0 -1736
- data/vendor/local/include/glib-2.0/gobject/gtypemodule.h +0 -263
- data/vendor/local/include/glib-2.0/gobject/gtypeplugin.h +0 -134
- data/vendor/local/include/glib-2.0/gobject/gvalue.h +0 -159
- data/vendor/local/include/glib-2.0/gobject/gvaluearray.h +0 -77
- data/vendor/local/include/glib-2.0/gobject/gvaluecollector.h +0 -227
- data/vendor/local/include/glib-2.0/gobject/gvaluetypes.h +0 -260
- data/vendor/local/include/libintl.h +0 -464
- data/vendor/local/lib/GNU.Gettext.dll +0 -0
- data/vendor/local/lib/gio-2.0.def +0 -1143
- data/vendor/local/lib/gio-2.0.lib +0 -0
- data/vendor/local/lib/glib-2.0.def +0 -1452
- data/vendor/local/lib/glib-2.0.lib +0 -0
- data/vendor/local/lib/glib-2.0/include/glibconfig.h +0 -284
- data/vendor/local/lib/gmodule-2.0.def +0 -11
- data/vendor/local/lib/gmodule-2.0.lib +0 -0
- data/vendor/local/lib/gobject-2.0.def +0 -370
- data/vendor/local/lib/gobject-2.0.lib +0 -0
- data/vendor/local/lib/gthread-2.0.def +0 -3
- data/vendor/local/lib/gthread-2.0.lib +0 -0
- data/vendor/local/lib/intl.lib +0 -0
- data/vendor/local/lib/libasprintf.dll.a +0 -0
- data/vendor/local/lib/libgio-2.0.dll.a +0 -0
- data/vendor/local/lib/libglib-2.0.dll.a +0 -0
- data/vendor/local/lib/libgmodule-2.0.dll.a +0 -0
- data/vendor/local/lib/libgobject-2.0.dll.a +0 -0
- data/vendor/local/lib/libgthread-2.0.dll.a +0 -0
- data/vendor/local/lib/libintl.def +0 -31
- data/vendor/local/lib/libintl.dll.a +0 -0
- data/vendor/local/lib/pkgconfig/gio-2.0.pc +0 -15
- data/vendor/local/lib/pkgconfig/gio-windows-2.0.pc +0 -11
- data/vendor/local/lib/pkgconfig/glib-2.0.pc +0 -15
- data/vendor/local/lib/pkgconfig/gmodule-2.0.pc +0 -14
- data/vendor/local/lib/pkgconfig/gmodule-no-export-2.0.pc +0 -14
- data/vendor/local/lib/pkgconfig/gobject-2.0.pc +0 -11
- data/vendor/local/lib/pkgconfig/gthread-2.0.pc +0 -11
- data/vendor/local/manifest/gettext-runtime-dev_0.18.1.1-2_win32.mft +0 -81
- data/vendor/local/manifest/gettext-runtime_0.18.1.1-2_win32.mft +0 -3
- data/vendor/local/manifest/glib-dev_2.26.0-2_win32.mft +0 -570
- data/vendor/local/manifest/glib_2.26.0-2_win32.mft +0 -102
- data/vendor/local/share/aclocal/glib-2.0.m4 +0 -211
- data/vendor/local/share/aclocal/glib-gettext.m4 +0 -432
- data/vendor/local/share/doc/gettext/bind_textdomain_codeset.3.html +0 -165
- data/vendor/local/share/doc/gettext/bindtextdomain.3.html +0 -160
- data/vendor/local/share/doc/gettext/csharpdoc/GNU_Gettext.html +0 -8
- data/vendor/local/share/doc/gettext/csharpdoc/GNU_Gettext_GettextResourceManager.html +0 -305
- data/vendor/local/share/doc/gettext/csharpdoc/GNU_Gettext_GettextResourceSet.html +0 -356
- data/vendor/local/share/doc/gettext/csharpdoc/begin.html +0 -11
- data/vendor/local/share/doc/gettext/csharpdoc/index.html +0 -10
- data/vendor/local/share/doc/gettext/csharpdoc/namespaces.html +0 -6
- data/vendor/local/share/doc/gettext/envsubst.1.html +0 -213
- data/vendor/local/share/doc/gettext/gettext.1.html +0 -266
- data/vendor/local/share/doc/gettext/gettext.3.html +0 -186
- data/vendor/local/share/doc/gettext/ngettext.1.html +0 -280
- data/vendor/local/share/doc/gettext/ngettext.3.html +0 -143
- data/vendor/local/share/doc/gettext/textdomain.3.html +0 -150
- data/vendor/local/share/doc/glib-2.26.0/COPYING +0 -482
- data/vendor/local/share/doc/glib-dev-2.26.0/COPYING +0 -482
- data/vendor/local/share/doc/libasprintf/autosprintf_all.html +0 -174
- data/vendor/local/share/glib-2.0/gdb/glib.py +0 -249
- data/vendor/local/share/glib-2.0/gdb/gobject.py +0 -305
- data/vendor/local/share/glib-2.0/gettext/mkinstalldirs +0 -111
- data/vendor/local/share/glib-2.0/gettext/po/Makefile.in.in +0 -279
- data/vendor/local/share/glib-2.0/schemas/gschema.dtd +0 -60
- data/vendor/local/share/gtk-doc/html/gio/GAppInfo.html +0 -1403
- data/vendor/local/share/gtk-doc/html/gio/GAsyncInitable.html +0 -733
- data/vendor/local/share/gtk-doc/html/gio/GAsyncResult.html +0 -343
- data/vendor/local/share/gtk-doc/html/gio/GBufferedInputStream.html +0 -563
- data/vendor/local/share/gtk-doc/html/gio/GBufferedOutputStream.html +0 -291
- data/vendor/local/share/gtk-doc/html/gio/GCancellable.html +0 -620
- data/vendor/local/share/gtk-doc/html/gio/GCharsetConverter.html +0 -245
- data/vendor/local/share/gtk-doc/html/gio/GConverter.html +0 -423
- data/vendor/local/share/gtk-doc/html/gio/GCredentials.html +0 -398
- data/vendor/local/share/gtk-doc/html/gio/GDBusAuthObserver.html +0 -254
- data/vendor/local/share/gtk-doc/html/gio/GDBusConnection.html +0 -6211
- data/vendor/local/share/gtk-doc/html/gio/GDBusMessage.html +0 -1833
- data/vendor/local/share/gtk-doc/html/gio/GDBusMethodInvocation.html +0 -618
- data/vendor/local/share/gtk-doc/html/gio/GDBusProxy.html +0 -2050
- data/vendor/local/share/gtk-doc/html/gio/GDBusServer.html +0 -1124
- data/vendor/local/share/gtk-doc/html/gio/GDataInputStream.html +0 -1215
- data/vendor/local/share/gtk-doc/html/gio/GDataOutputStream.html +0 -540
- data/vendor/local/share/gtk-doc/html/gio/GDrive.html +0 -1416
- data/vendor/local/share/gtk-doc/html/gio/GEmblem.html +0 -272
- data/vendor/local/share/gtk-doc/html/gio/GEmblemedIcon.html +0 -206
- data/vendor/local/share/gtk-doc/html/gio/GFile.html +0 -7462
- data/vendor/local/share/gtk-doc/html/gio/GFileDescriptorBased.html +0 -120
- data/vendor/local/share/gtk-doc/html/gio/GFileEnumerator.html +0 -516
- data/vendor/local/share/gtk-doc/html/gio/GFileIOStream.html +0 -312
- data/vendor/local/share/gtk-doc/html/gio/GFileIcon.html +0 -155
- data/vendor/local/share/gtk-doc/html/gio/GFileInfo.html +0 -3144
- data/vendor/local/share/gtk-doc/html/gio/GFileInputStream.html +0 -262
- data/vendor/local/share/gtk-doc/html/gio/GFileMonitor.html +0 -353
- data/vendor/local/share/gtk-doc/html/gio/GFileOutputStream.html +0 -301
- data/vendor/local/share/gtk-doc/html/gio/GFilenameCompleter.html +0 -217
- data/vendor/local/share/gtk-doc/html/gio/GFilterInputStream.html +0 -188
- data/vendor/local/share/gtk-doc/html/gio/GFilterOutputStream.html +0 -189
- data/vendor/local/share/gtk-doc/html/gio/GIOModule.html +0 -261
- data/vendor/local/share/gtk-doc/html/gio/GIOStream.html +0 -479
- data/vendor/local/share/gtk-doc/html/gio/GIcon.html +0 -331
- data/vendor/local/share/gtk-doc/html/gio/GInetAddress.html +0 -717
- data/vendor/local/share/gtk-doc/html/gio/GInetSocketAddress.html +0 -196
- data/vendor/local/share/gtk-doc/html/gio/GInitable.html +0 -388
- data/vendor/local/share/gtk-doc/html/gio/GInputStream.html +0 -808
- data/vendor/local/share/gtk-doc/html/gio/GLoadableIcon.html +0 -301
- data/vendor/local/share/gtk-doc/html/gio/GMemoryInputStream.html +0 -185
- data/vendor/local/share/gtk-doc/html/gio/GMemoryOutputStream.html +0 -393
- data/vendor/local/share/gtk-doc/html/gio/GMount.html +0 -1465
- data/vendor/local/share/gtk-doc/html/gio/GMountOperation.html +0 -848
- data/vendor/local/share/gtk-doc/html/gio/GNetworkAddress.html +0 -343
- data/vendor/local/share/gtk-doc/html/gio/GNetworkService.html +0 -311
- data/vendor/local/share/gtk-doc/html/gio/GOutputStream.html +0 -1012
- data/vendor/local/share/gtk-doc/html/gio/GPermission.html +0 -560
- data/vendor/local/share/gtk-doc/html/gio/GProxy.html +0 -312
- data/vendor/local/share/gtk-doc/html/gio/GProxyAddress.html +0 -348
- data/vendor/local/share/gtk-doc/html/gio/GProxyResolver.html +0 -301
- data/vendor/local/share/gtk-doc/html/gio/GResolver.html +0 -787
- data/vendor/local/share/gtk-doc/html/gio/GSeekable.html +0 -350
- data/vendor/local/share/gtk-doc/html/gio/GSettings.html +0 -2424
- data/vendor/local/share/gtk-doc/html/gio/GSettingsBackend.html +0 -609
- data/vendor/local/share/gtk-doc/html/gio/GSimpleAsyncResult.html +0 -1193
- data/vendor/local/share/gtk-doc/html/gio/GSimplePermission.html +0 -107
- data/vendor/local/share/gtk-doc/html/gio/GSocket.html +0 -2438
- data/vendor/local/share/gtk-doc/html/gio/GSocketAddress.html +0 -297
- data/vendor/local/share/gtk-doc/html/gio/GSocketClient.html +0 -1292
- data/vendor/local/share/gtk-doc/html/gio/GSocketConnectable.html +0 -513
- data/vendor/local/share/gtk-doc/html/gio/GSocketConnection.html +0 -337
- data/vendor/local/share/gtk-doc/html/gio/GSocketControlMessage.html +0 -275
- data/vendor/local/share/gtk-doc/html/gio/GSocketListener.html +0 -745
- data/vendor/local/share/gtk-doc/html/gio/GSocketService.html +0 -258
- data/vendor/local/share/gtk-doc/html/gio/GTcpConnection.html +0 -165
- data/vendor/local/share/gtk-doc/html/gio/GThemedIcon.html +0 -377
- data/vendor/local/share/gtk-doc/html/gio/GThreadedSocketService.html +0 -197
- data/vendor/local/share/gtk-doc/html/gio/GUnixConnection.html +0 -298
- data/vendor/local/share/gtk-doc/html/gio/GUnixCredentialsMessage.html +0 -222
- data/vendor/local/share/gtk-doc/html/gio/GUnixFDList.html +0 -389
- data/vendor/local/share/gtk-doc/html/gio/GUnixFDMessage.html +0 -288
- data/vendor/local/share/gtk-doc/html/gio/GUnixInputStream.html +0 -237
- data/vendor/local/share/gtk-doc/html/gio/GUnixOutputStream.html +0 -237
- data/vendor/local/share/gtk-doc/html/gio/GUnixSocketAddress.html +0 -491
- data/vendor/local/share/gtk-doc/html/gio/GVfs.html +0 -274
- data/vendor/local/share/gtk-doc/html/gio/GVolume.html +0 -1028
- data/vendor/local/share/gtk-doc/html/gio/GVolumeMonitor.html +0 -705
- data/vendor/local/share/gtk-doc/html/gio/GZlibCompressor.html +0 -252
- data/vendor/local/share/gtk-doc/html/gio/GZlibDecompressor.html +0 -170
- data/vendor/local/share/gtk-doc/html/gio/annotation-glossary.html +0 -65
- data/vendor/local/share/gtk-doc/html/gio/api-index-2-18.html +0 -153
- data/vendor/local/share/gtk-doc/html/gio/api-index-2-20.html +0 -155
- data/vendor/local/share/gtk-doc/html/gio/api-index-2-22.html +0 -1084
- data/vendor/local/share/gtk-doc/html/gio/api-index-2-24.html +0 -223
- data/vendor/local/share/gtk-doc/html/gio/api-index-2-26.html +0 -1598
- data/vendor/local/share/gtk-doc/html/gio/api-index-deprecated.html +0 -112
- data/vendor/local/share/gtk-doc/html/gio/api-index-full.html +0 -6250
- data/vendor/local/share/gtk-doc/html/gio/async.html +0 -44
- data/vendor/local/share/gtk-doc/html/gio/ch01.html +0 -207
- data/vendor/local/share/gtk-doc/html/gio/ch02.html +0 -50
- data/vendor/local/share/gtk-doc/html/gio/ch03.html +0 -180
- data/vendor/local/share/gtk-doc/html/gio/ch24.html +0 -75
- data/vendor/local/share/gtk-doc/html/gio/ch25.html +0 -217
- data/vendor/local/share/gtk-doc/html/gio/ch25s02.html +0 -41
- data/vendor/local/share/gtk-doc/html/gio/ch25s03.html +0 -39
- data/vendor/local/share/gtk-doc/html/gio/ch26.html +0 -57
- data/vendor/local/share/gtk-doc/html/gio/ch26s02.html +0 -59
- data/vendor/local/share/gtk-doc/html/gio/ch26s03.html +0 -159
- data/vendor/local/share/gtk-doc/html/gio/ch26s04.html +0 -46
- data/vendor/local/share/gtk-doc/html/gio/ch26s05.html +0 -48
- data/vendor/local/share/gtk-doc/html/gio/ch26s06.html +0 -277
- data/vendor/local/share/gtk-doc/html/gio/ch26s07.html +0 -95
- data/vendor/local/share/gtk-doc/html/gio/ch27.html +0 -70
- data/vendor/local/share/gtk-doc/html/gio/ch27s02.html +0 -130
- data/vendor/local/share/gtk-doc/html/gio/ch27s03.html +0 -202
- data/vendor/local/share/gtk-doc/html/gio/ch27s04.html +0 -96
- data/vendor/local/share/gtk-doc/html/gio/ch27s05.html +0 -823
- data/vendor/local/share/gtk-doc/html/gio/ch27s06.html +0 -828
- data/vendor/local/share/gtk-doc/html/gio/conversion.html +0 -44
- data/vendor/local/share/gtk-doc/html/gio/extending-gio.html +0 -109
- data/vendor/local/share/gtk-doc/html/gio/extending.html +0 -41
- data/vendor/local/share/gtk-doc/html/gio/failable_initialization.html +0 -38
- data/vendor/local/share/gtk-doc/html/gio/file_mon.html +0 -33
- data/vendor/local/share/gtk-doc/html/gio/file_ops.html +0 -50
- data/vendor/local/share/gtk-doc/html/gio/gdbus-convenience.html +0 -41
- data/vendor/local/share/gtk-doc/html/gio/gdbus-lowlevel.html +0 -59
- data/vendor/local/share/gtk-doc/html/gio/gdbus.html +0 -243
- data/vendor/local/share/gtk-doc/html/gio/gio-D-Bus-Addresses.html +0 -316
- data/vendor/local/share/gtk-doc/html/gio/gio-D-Bus-Introspection-Data.html +0 -1117
- data/vendor/local/share/gtk-doc/html/gio/gio-D-Bus-Utilities.html +0 -216
- data/vendor/local/share/gtk-doc/html/gio/gio-Desktop-file-based-GAppInfo.html +0 -339
- data/vendor/local/share/gtk-doc/html/gio/gio-Extension-Points.html +0 -473
- data/vendor/local/share/gtk-doc/html/gio/gio-GContentType.html +0 -391
- data/vendor/local/share/gtk-doc/html/gio/gio-GConverterInputstream.html +0 -159
- data/vendor/local/share/gtk-doc/html/gio/gio-GConverterOutputstream.html +0 -159
- data/vendor/local/share/gtk-doc/html/gio/gio-GDBusError.html +0 -908
- data/vendor/local/share/gtk-doc/html/gio/gio-GFileAttribute.html +0 -933
- data/vendor/local/share/gtk-doc/html/gio/gio-GIOError.html +0 -409
- data/vendor/local/share/gtk-doc/html/gio/gio-GIOScheduler.html +0 -297
- data/vendor/local/share/gtk-doc/html/gio/gio-GSrvTarget.html +0 -313
- data/vendor/local/share/gtk-doc/html/gio/gio-Owning-Bus-Names.html +0 -736
- data/vendor/local/share/gtk-doc/html/gio/gio-Unix-Mounts.html +0 -909
- data/vendor/local/share/gtk-doc/html/gio/gio-Watching-Bus-Names.html +0 -666
- data/vendor/local/share/gtk-doc/html/gio/gio-hierarchy.html +0 -123
- data/vendor/local/share/gtk-doc/html/gio/gio-querymodules.html +0 -53
- data/vendor/local/share/gtk-doc/html/gio/gio.devhelp +0 -1736
- data/vendor/local/share/gtk-doc/html/gio/gio.devhelp2 +0 -2006
- data/vendor/local/share/gtk-doc/html/gio/glib-compile-schemas.html +0 -102
- data/vendor/local/share/gtk-doc/html/gio/gvfs-overview.png +0 -0
- data/vendor/local/share/gtk-doc/html/gio/highlevel-socket.html +0 -53
- data/vendor/local/share/gtk-doc/html/gio/home.png +0 -0
- data/vendor/local/share/gtk-doc/html/gio/icons.html +0 -50
- data/vendor/local/share/gtk-doc/html/gio/index.html +0 -435
- data/vendor/local/share/gtk-doc/html/gio/index.sgml +0 -2513
- data/vendor/local/share/gtk-doc/html/gio/left.png +0 -0
- data/vendor/local/share/gtk-doc/html/gio/migrating.html +0 -62
- data/vendor/local/share/gtk-doc/html/gio/networking.html +0 -69
- data/vendor/local/share/gtk-doc/html/gio/permissions.html +0 -39
- data/vendor/local/share/gtk-doc/html/gio/pt01.html +0 -39
- data/vendor/local/share/gtk-doc/html/gio/pt02.html +0 -390
- data/vendor/local/share/gtk-doc/html/gio/resolver.html +0 -50
- data/vendor/local/share/gtk-doc/html/gio/right.png +0 -0
- data/vendor/local/share/gtk-doc/html/gio/settings.html +0 -38
- data/vendor/local/share/gtk-doc/html/gio/streaming.html +0 -92
- data/vendor/local/share/gtk-doc/html/gio/style.css +0 -265
- data/vendor/local/share/gtk-doc/html/gio/tools.html +0 -44
- data/vendor/local/share/gtk-doc/html/gio/types.html +0 -41
- data/vendor/local/share/gtk-doc/html/gio/up.png +0 -0
- data/vendor/local/share/gtk-doc/html/gio/utils.html +0 -33
- data/vendor/local/share/gtk-doc/html/gio/volume_mon.html +0 -47
- data/vendor/local/share/gtk-doc/html/glib/annotation-glossary.html +0 -77
- data/vendor/local/share/gtk-doc/html/glib/api-index-2-10.html +0 -180
- data/vendor/local/share/gtk-doc/html/glib/api-index-2-12.html +0 -312
- data/vendor/local/share/gtk-doc/html/glib/api-index-2-14.html +0 -559
- data/vendor/local/share/gtk-doc/html/glib/api-index-2-16.html +0 -362
- data/vendor/local/share/gtk-doc/html/glib/api-index-2-18.html +0 -102
- data/vendor/local/share/gtk-doc/html/glib/api-index-2-2.html +0 -124
- data/vendor/local/share/gtk-doc/html/glib/api-index-2-20.html +0 -83
- data/vendor/local/share/gtk-doc/html/glib/api-index-2-22.html +0 -194
- data/vendor/local/share/gtk-doc/html/glib/api-index-2-24.html +0 -420
- data/vendor/local/share/gtk-doc/html/glib/api-index-2-26.html +0 -359
- data/vendor/local/share/gtk-doc/html/glib/api-index-2-4.html +0 -396
- data/vendor/local/share/gtk-doc/html/glib/api-index-2-6.html +0 -417
- data/vendor/local/share/gtk-doc/html/glib/api-index-2-8.html +0 -158
- data/vendor/local/share/gtk-doc/html/glib/api-index-deprecated.html +0 -419
- data/vendor/local/share/gtk-doc/html/glib/api-index-full.html +0 -8214
- data/vendor/local/share/gtk-doc/html/glib/file-name-encodings.png +0 -0
- data/vendor/local/share/gtk-doc/html/glib/glib-Arrays.html +0 -893
- data/vendor/local/share/gtk-doc/html/glib/glib-Asynchronous-Queues.html +0 -818
- data/vendor/local/share/gtk-doc/html/glib/glib-Atomic-Operations.html +0 -414
- data/vendor/local/share/gtk-doc/html/glib/glib-Automatic-String-Completion.html +0 -466
- data/vendor/local/share/gtk-doc/html/glib/glib-Balanced-Binary-Trees.html +0 -802
- data/vendor/local/share/gtk-doc/html/glib/glib-Base64-Encoding.html +0 -372
- data/vendor/local/share/gtk-doc/html/glib/glib-Basic-Types.html +0 -500
- data/vendor/local/share/gtk-doc/html/glib/glib-Bookmark-file-parser.html +0 -2056
- data/vendor/local/share/gtk-doc/html/glib/glib-Byte-Arrays.html +0 -560
- data/vendor/local/share/gtk-doc/html/glib/glib-Byte-Order-Macros.html +0 -1686
- data/vendor/local/share/gtk-doc/html/glib/glib-Caches.html +0 -398
- data/vendor/local/share/gtk-doc/html/glib/glib-Character-Set-Conversion.html +0 -1094
- data/vendor/local/share/gtk-doc/html/glib/glib-Commandline-option-parser.html +0 -1671
- data/vendor/local/share/gtk-doc/html/glib/glib-Data-Checksums.html +0 -460
- data/vendor/local/share/gtk-doc/html/glib/glib-Datasets.html +0 -528
- data/vendor/local/share/gtk-doc/html/glib/glib-Date-and-Time-Functions.html +0 -2045
- data/vendor/local/share/gtk-doc/html/glib/glib-Double-ended-Queues.html +0 -1278
- data/vendor/local/share/gtk-doc/html/glib/glib-Doubly-Linked-Lists.html +0 -1406
- data/vendor/local/share/gtk-doc/html/glib/glib-Dynamic-Loading-of-Modules.html +0 -548
- data/vendor/local/share/gtk-doc/html/glib/glib-Error-Reporting.html +0 -1026
- data/vendor/local/share/gtk-doc/html/glib/glib-File-Utilities.html +0 -1852
- data/vendor/local/share/gtk-doc/html/glib/glib-GDateTime.html +0 -2201
- data/vendor/local/share/gtk-doc/html/glib/glib-GTimeZone.html +0 -239
- data/vendor/local/share/gtk-doc/html/glib/glib-GVariant.html +0 -4278
- data/vendor/local/share/gtk-doc/html/glib/glib-GVariantType.html +0 -1864
- data/vendor/local/share/gtk-doc/html/glib/glib-Glob-style-pattern-matching.html +0 -295
- data/vendor/local/share/gtk-doc/html/glib/glib-Hash-Tables.html +0 -1512
- data/vendor/local/share/gtk-doc/html/glib/glib-Hook-Functions.html +0 -1367
- data/vendor/local/share/gtk-doc/html/glib/glib-Hostname-Utilities.html +0 -229
- data/vendor/local/share/gtk-doc/html/glib/glib-I18N.html +0 -692
- data/vendor/local/share/gtk-doc/html/glib/glib-IO-Channels.html +0 -2196
- data/vendor/local/share/gtk-doc/html/glib/glib-Key-value-file-parser.html +0 -2740
- data/vendor/local/share/gtk-doc/html/glib/glib-Keyed-Data-Lists.html +0 -612
- data/vendor/local/share/gtk-doc/html/glib/glib-Lexical-Scanner.html +0 -1451
- data/vendor/local/share/gtk-doc/html/glib/glib-Limits-of-Basic-Types.html +0 -389
- data/vendor/local/share/gtk-doc/html/glib/glib-Memory-Allocation.html +0 -1033
- data/vendor/local/share/gtk-doc/html/glib/glib-Memory-Allocators.html +0 -141
- data/vendor/local/share/gtk-doc/html/glib/glib-Memory-Chunks.html +0 -706
- data/vendor/local/share/gtk-doc/html/glib/glib-Memory-Slices.html +0 -510
- data/vendor/local/share/gtk-doc/html/glib/glib-Message-Logging.html +0 -748
- data/vendor/local/share/gtk-doc/html/glib/glib-Miscellaneous-Macros.html +0 -1105
- data/vendor/local/share/gtk-doc/html/glib/glib-Miscellaneous-Utility-Functions.html +0 -1552
- data/vendor/local/share/gtk-doc/html/glib/glib-N-ary-Trees.html +0 -1468
- data/vendor/local/share/gtk-doc/html/glib/glib-Numerical-Definitions.html +0 -194
- data/vendor/local/share/gtk-doc/html/glib/glib-Perl-compatible-regular-expressions.html +0 -2745
- data/vendor/local/share/gtk-doc/html/glib/glib-Pointer-Arrays.html +0 -752
- data/vendor/local/share/gtk-doc/html/glib/glib-Quarks.html +0 -269
- data/vendor/local/share/gtk-doc/html/glib/glib-Random-Numbers.html +0 -578
- data/vendor/local/share/gtk-doc/html/glib/glib-Relations-and-Tuples.html +0 -532
- data/vendor/local/share/gtk-doc/html/glib/glib-Sequences.html +0 -1353
- data/vendor/local/share/gtk-doc/html/glib/glib-Shell-related-Utilities.html +0 -238
- data/vendor/local/share/gtk-doc/html/glib/glib-Simple-XML-Subset-Parser.html +0 -1282
- data/vendor/local/share/gtk-doc/html/glib/glib-Singly-Linked-Lists.html +0 -1213
- data/vendor/local/share/gtk-doc/html/glib/glib-Spawning-Processes.html +0 -924
- data/vendor/local/share/gtk-doc/html/glib/glib-Standard-Macros.html +0 -470
- data/vendor/local/share/gtk-doc/html/glib/glib-String-Chunks.html +0 -301
- data/vendor/local/share/gtk-doc/html/glib/glib-String-Utility-Functions.html +0 -2960
- data/vendor/local/share/gtk-doc/html/glib/glib-Strings.html +0 -1291
- data/vendor/local/share/gtk-doc/html/glib/glib-Testing.html +0 -1805
- data/vendor/local/share/gtk-doc/html/glib/glib-The-Main-Event-Loop.html +0 -3478
- data/vendor/local/share/gtk-doc/html/glib/glib-Thread-Pools.html +0 -606
- data/vendor/local/share/gtk-doc/html/glib/glib-Threads.html +0 -3411
- data/vendor/local/share/gtk-doc/html/glib/glib-Timers.html +0 -245
- data/vendor/local/share/gtk-doc/html/glib/glib-Trash-Stacks.html +0 -188
- data/vendor/local/share/gtk-doc/html/glib/glib-Type-Conversion-Macros.html +0 -263
- data/vendor/local/share/gtk-doc/html/glib/glib-URI-Functions.html +0 -400
- data/vendor/local/share/gtk-doc/html/glib/glib-Unicode-Manipulation.html +0 -3448
- data/vendor/local/share/gtk-doc/html/glib/glib-Version-Information.html +0 -253
- data/vendor/local/share/gtk-doc/html/glib/glib-Warnings-and-Assertions.html +0 -438
- data/vendor/local/share/gtk-doc/html/glib/glib-Windows-Compatibility-Functions.html +0 -476
- data/vendor/local/share/gtk-doc/html/glib/glib-building.html +0 -466
- data/vendor/local/share/gtk-doc/html/glib/glib-changes.html +0 -159
- data/vendor/local/share/gtk-doc/html/glib/glib-compiling.html +0 -118
- data/vendor/local/share/gtk-doc/html/glib/glib-core.html +0 -64
- data/vendor/local/share/gtk-doc/html/glib/glib-cross-compiling.html +0 -160
- data/vendor/local/share/gtk-doc/html/glib/glib-data-types.html +0 -120
- data/vendor/local/share/gtk-doc/html/glib/glib-fundamentals.html +0 -59
- data/vendor/local/share/gtk-doc/html/glib/glib-gettextize.html +0 -93
- data/vendor/local/share/gtk-doc/html/glib/glib-regex-syntax.html +0 -2217
- data/vendor/local/share/gtk-doc/html/glib/glib-resources.html +0 -121
- data/vendor/local/share/gtk-doc/html/glib/glib-running.html +0 -319
- data/vendor/local/share/gtk-doc/html/glib/glib-utilities.html +0 -118
- data/vendor/local/share/gtk-doc/html/glib/glib.devhelp +0 -2183
- data/vendor/local/share/gtk-doc/html/glib/glib.devhelp2 +0 -2671
- data/vendor/local/share/gtk-doc/html/glib/glib.html +0 -80
- data/vendor/local/share/gtk-doc/html/glib/gtester-report.html +0 -72
- data/vendor/local/share/gtk-doc/html/glib/gtester.html +0 -131
- data/vendor/local/share/gtk-doc/html/glib/gvariant-format-strings.html +0 -1288
- data/vendor/local/share/gtk-doc/html/glib/home.png +0 -0
- data/vendor/local/share/gtk-doc/html/glib/index.html +0 -344
- data/vendor/local/share/gtk-doc/html/glib/index.sgml +0 -2846
- data/vendor/local/share/gtk-doc/html/glib/left.png +0 -0
- data/vendor/local/share/gtk-doc/html/glib/mainloop-states.gif +0 -0
- data/vendor/local/share/gtk-doc/html/glib/right.png +0 -0
- data/vendor/local/share/gtk-doc/html/glib/style.css +0 -265
- data/vendor/local/share/gtk-doc/html/glib/tools.html +0 -41
- data/vendor/local/share/gtk-doc/html/glib/up.png +0 -0
- data/vendor/local/share/gtk-doc/html/gobject/GBinding.html +0 -803
- data/vendor/local/share/gtk-doc/html/gobject/GTypeModule.html +0 -710
- data/vendor/local/share/gtk-doc/html/gobject/GTypePlugin.html +0 -453
- data/vendor/local/share/gtk-doc/html/gobject/annotation-glossary.html +0 -47
- data/vendor/local/share/gtk-doc/html/gobject/api-index-2-10.html +0 -85
- data/vendor/local/share/gtk-doc/html/gobject/api-index-2-12.html +0 -55
- data/vendor/local/share/gtk-doc/html/gobject/api-index-2-14.html +0 -51
- data/vendor/local/share/gtk-doc/html/gobject/api-index-2-18.html +0 -46
- data/vendor/local/share/gtk-doc/html/gobject/api-index-2-2.html +0 -38
- data/vendor/local/share/gtk-doc/html/gobject/api-index-2-22.html +0 -46
- data/vendor/local/share/gtk-doc/html/gobject/api-index-2-24.html +0 -73
- data/vendor/local/share/gtk-doc/html/gobject/api-index-2-26.html +0 -201
- data/vendor/local/share/gtk-doc/html/gobject/api-index-2-4.html +0 -178
- data/vendor/local/share/gtk-doc/html/gobject/api-index-2-6.html +0 -42
- data/vendor/local/share/gtk-doc/html/gobject/api-index-2-8.html +0 -42
- data/vendor/local/share/gtk-doc/html/gobject/api-index-deprecated.html +0 -50
- data/vendor/local/share/gtk-doc/html/gobject/api-index-full.html +0 -2721
- data/vendor/local/share/gtk-doc/html/gobject/ch01s02.html +0 -136
- data/vendor/local/share/gtk-doc/html/gobject/ch06s03.html +0 -113
- data/vendor/local/share/gtk-doc/html/gobject/chapter-gobject.html +0 -293
- data/vendor/local/share/gtk-doc/html/gobject/chapter-gtype.html +0 -263
- data/vendor/local/share/gtk-doc/html/gobject/chapter-intro.html +0 -92
- data/vendor/local/share/gtk-doc/html/gobject/chapter-signal.html +0 -214
- data/vendor/local/share/gtk-doc/html/gobject/glib-genmarshal.html +0 -361
- data/vendor/local/share/gtk-doc/html/gobject/glib-mkenums.html +0 -307
- data/vendor/local/share/gtk-doc/html/gobject/glue.png +0 -0
- data/vendor/local/share/gtk-doc/html/gobject/gobject-Boxed-Types.html +0 -417
- data/vendor/local/share/gtk-doc/html/gobject/gobject-Closures.html +0 -2412
- data/vendor/local/share/gtk-doc/html/gobject/gobject-Enumeration-and-Flag-Types.html +0 -847
- data/vendor/local/share/gtk-doc/html/gobject/gobject-GParamSpec.html +0 -1433
- data/vendor/local/share/gtk-doc/html/gobject/gobject-Generic-values.html +0 -776
- data/vendor/local/share/gtk-doc/html/gobject/gobject-Signals.html +0 -2741
- data/vendor/local/share/gtk-doc/html/gobject/gobject-Standard-Parameter-and-Value-Types.html +0 -5555
- data/vendor/local/share/gtk-doc/html/gobject/gobject-The-Base-Object-Type.html +0 -2875
- data/vendor/local/share/gtk-doc/html/gobject/gobject-Type-Information.html +0 -4460
- data/vendor/local/share/gtk-doc/html/gobject/gobject-Value-arrays.html +0 -416
- data/vendor/local/share/gtk-doc/html/gobject/gobject-Varargs-Value-Collection.html +0 -260
- data/vendor/local/share/gtk-doc/html/gobject/gobject-memory.html +0 -234
- data/vendor/local/share/gtk-doc/html/gobject/gobject-properties.html +0 -270
- data/vendor/local/share/gtk-doc/html/gobject/gobject-query.html +0 -117
- data/vendor/local/share/gtk-doc/html/gobject/gobject.devhelp +0 -762
- data/vendor/local/share/gtk-doc/html/gobject/gobject.devhelp2 +0 -801
- data/vendor/local/share/gtk-doc/html/gobject/gtype-conventions.html +0 -143
- data/vendor/local/share/gtk-doc/html/gobject/gtype-instantiable-classed.html +0 -287
- data/vendor/local/share/gtk-doc/html/gobject/gtype-non-instantiable-classed.html +0 -316
- data/vendor/local/share/gtk-doc/html/gobject/gtype-non-instantiable.html +0 -76
- data/vendor/local/share/gtk-doc/html/gobject/home.png +0 -0
- data/vendor/local/share/gtk-doc/html/gobject/howto-gobject-chainup.html +0 -100
- data/vendor/local/share/gtk-doc/html/gobject/howto-gobject-code.html +0 -86
- data/vendor/local/share/gtk-doc/html/gobject/howto-gobject-construction.html +0 -113
- data/vendor/local/share/gtk-doc/html/gobject/howto-gobject-destruction.html +0 -122
- data/vendor/local/share/gtk-doc/html/gobject/howto-gobject-methods.html +0 -257
- data/vendor/local/share/gtk-doc/html/gobject/howto-gobject.html +0 -283
- data/vendor/local/share/gtk-doc/html/gobject/howto-interface-implement.html +0 -125
- data/vendor/local/share/gtk-doc/html/gobject/howto-interface-properties.html +0 -167
- data/vendor/local/share/gtk-doc/html/gobject/howto-interface.html +0 -160
- data/vendor/local/share/gtk-doc/html/gobject/howto-signals.html +0 -121
- data/vendor/local/share/gtk-doc/html/gobject/index.html +0 -192
- data/vendor/local/share/gtk-doc/html/gobject/index.sgml +0 -786
- data/vendor/local/share/gtk-doc/html/gobject/left.png +0 -0
- data/vendor/local/share/gtk-doc/html/gobject/pr01.html +0 -72
- data/vendor/local/share/gtk-doc/html/gobject/pt01.html +0 -80
- data/vendor/local/share/gtk-doc/html/gobject/pt02.html +0 -66
- data/vendor/local/share/gtk-doc/html/gobject/pt03.html +0 -55
- data/vendor/local/share/gtk-doc/html/gobject/right.png +0 -0
- data/vendor/local/share/gtk-doc/html/gobject/rn01.html +0 -85
- data/vendor/local/share/gtk-doc/html/gobject/rn02.html +0 -47
- data/vendor/local/share/gtk-doc/html/gobject/signal.html +0 -377
- data/vendor/local/share/gtk-doc/html/gobject/style.css +0 -265
- data/vendor/local/share/gtk-doc/html/gobject/tools-ginspector.html +0 -35
- data/vendor/local/share/gtk-doc/html/gobject/tools-gob.html +0 -40
- data/vendor/local/share/gtk-doc/html/gobject/tools-gtkdoc.html +0 -63
- data/vendor/local/share/gtk-doc/html/gobject/tools-refdb.html +0 -55
- data/vendor/local/share/gtk-doc/html/gobject/tools-vala.html +0 -43
- data/vendor/local/share/gtk-doc/html/gobject/up.png +0 -0
- data/vendor/local/share/locale/af/LC_MESSAGES/glib20.mo +0 -0
- data/vendor/local/share/locale/am/LC_MESSAGES/glib20.mo +0 -0
- data/vendor/local/share/locale/ar/LC_MESSAGES/glib20.mo +0 -0
- data/vendor/local/share/locale/as/LC_MESSAGES/glib20.mo +0 -0
- data/vendor/local/share/locale/ast/LC_MESSAGES/glib20.mo +0 -0
- data/vendor/local/share/locale/az/LC_MESSAGES/glib20.mo +0 -0
- data/vendor/local/share/locale/be/LC_MESSAGES/gettext-runtime.mo +0 -0
- data/vendor/local/share/locale/be/LC_MESSAGES/glib20.mo +0 -0
- data/vendor/local/share/locale/be@latin/LC_MESSAGES/glib20.mo +0 -0
- data/vendor/local/share/locale/bg/LC_MESSAGES/gettext-runtime.mo +0 -0
- data/vendor/local/share/locale/bg/LC_MESSAGES/glib20.mo +0 -0
- data/vendor/local/share/locale/bn/LC_MESSAGES/glib20.mo +0 -0
- data/vendor/local/share/locale/bn_IN/LC_MESSAGES/glib20.mo +0 -0
- data/vendor/local/share/locale/bs/LC_MESSAGES/glib20.mo +0 -0
- data/vendor/local/share/locale/ca/LC_MESSAGES/gettext-runtime.mo +0 -0
- data/vendor/local/share/locale/ca/LC_MESSAGES/glib20.mo +0 -0
- data/vendor/local/share/locale/ca@valencia/LC_MESSAGES/glib20.mo +0 -0
- data/vendor/local/share/locale/cs/LC_MESSAGES/gettext-runtime.mo +0 -0
- data/vendor/local/share/locale/cs/LC_MESSAGES/glib20.mo +0 -0
- data/vendor/local/share/locale/cy/LC_MESSAGES/glib20.mo +0 -0
- data/vendor/local/share/locale/da/LC_MESSAGES/gettext-runtime.mo +0 -0
- data/vendor/local/share/locale/da/LC_MESSAGES/glib20.mo +0 -0
- data/vendor/local/share/locale/de/LC_MESSAGES/gettext-runtime.mo +0 -0
- data/vendor/local/share/locale/de/LC_MESSAGES/glib20.mo +0 -0
- data/vendor/local/share/locale/dz/LC_MESSAGES/glib20.mo +0 -0
- data/vendor/local/share/locale/el/LC_MESSAGES/gettext-runtime.mo +0 -0
- data/vendor/local/share/locale/el/LC_MESSAGES/glib20.mo +0 -0
- data/vendor/local/share/locale/en@boldquot/LC_MESSAGES/gettext-runtime.mo +0 -0
- data/vendor/local/share/locale/en@quot/LC_MESSAGES/gettext-runtime.mo +0 -0
- data/vendor/local/share/locale/en@shaw/LC_MESSAGES/glib20.mo +0 -0
- data/vendor/local/share/locale/en_CA/LC_MESSAGES/glib20.mo +0 -0
- data/vendor/local/share/locale/en_GB/LC_MESSAGES/glib20.mo +0 -0
- data/vendor/local/share/locale/eo/LC_MESSAGES/gettext-runtime.mo +0 -0
- data/vendor/local/share/locale/eo/LC_MESSAGES/glib20.mo +0 -0
- data/vendor/local/share/locale/es/LC_MESSAGES/gettext-runtime.mo +0 -0
- data/vendor/local/share/locale/es/LC_MESSAGES/glib20.mo +0 -0
- data/vendor/local/share/locale/et/LC_MESSAGES/gettext-runtime.mo +0 -0
- data/vendor/local/share/locale/et/LC_MESSAGES/glib20.mo +0 -0
- data/vendor/local/share/locale/eu/LC_MESSAGES/glib20.mo +0 -0
- data/vendor/local/share/locale/fa/LC_MESSAGES/glib20.mo +0 -0
- data/vendor/local/share/locale/fi/LC_MESSAGES/gettext-runtime.mo +0 -0
- data/vendor/local/share/locale/fi/LC_MESSAGES/glib20.mo +0 -0
- data/vendor/local/share/locale/fr/LC_MESSAGES/gettext-runtime.mo +0 -0
- data/vendor/local/share/locale/fr/LC_MESSAGES/glib20.mo +0 -0
- data/vendor/local/share/locale/ga/LC_MESSAGES/gettext-runtime.mo +0 -0
- data/vendor/local/share/locale/ga/LC_MESSAGES/glib20.mo +0 -0
- data/vendor/local/share/locale/gl/LC_MESSAGES/gettext-runtime.mo +0 -0
- data/vendor/local/share/locale/gl/LC_MESSAGES/glib20.mo +0 -0
- data/vendor/local/share/locale/gu/LC_MESSAGES/glib20.mo +0 -0
- data/vendor/local/share/locale/he/LC_MESSAGES/glib20.mo +0 -0
- data/vendor/local/share/locale/hi/LC_MESSAGES/glib20.mo +0 -0
- data/vendor/local/share/locale/hr/LC_MESSAGES/glib20.mo +0 -0
- data/vendor/local/share/locale/hu/LC_MESSAGES/glib20.mo +0 -0
- data/vendor/local/share/locale/hy/LC_MESSAGES/glib20.mo +0 -0
- data/vendor/local/share/locale/id/LC_MESSAGES/gettext-runtime.mo +0 -0
- data/vendor/local/share/locale/id/LC_MESSAGES/glib20.mo +0 -0
- data/vendor/local/share/locale/is/LC_MESSAGES/glib20.mo +0 -0
- data/vendor/local/share/locale/it/LC_MESSAGES/gettext-runtime.mo +0 -0
- data/vendor/local/share/locale/it/LC_MESSAGES/glib20.mo +0 -0
- data/vendor/local/share/locale/ja/LC_MESSAGES/gettext-runtime.mo +0 -0
- data/vendor/local/share/locale/ja/LC_MESSAGES/glib20.mo +0 -0
- data/vendor/local/share/locale/ka/LC_MESSAGES/glib20.mo +0 -0
- data/vendor/local/share/locale/kk/LC_MESSAGES/glib20.mo +0 -0
- data/vendor/local/share/locale/kn/LC_MESSAGES/glib20.mo +0 -0
- data/vendor/local/share/locale/ko/LC_MESSAGES/gettext-runtime.mo +0 -0
- data/vendor/local/share/locale/ko/LC_MESSAGES/glib20.mo +0 -0
- data/vendor/local/share/locale/ku/LC_MESSAGES/glib20.mo +0 -0
- data/vendor/local/share/locale/locale.alias +0 -77
- data/vendor/local/share/locale/lt/LC_MESSAGES/glib20.mo +0 -0
- data/vendor/local/share/locale/lv/LC_MESSAGES/glib20.mo +0 -0
- data/vendor/local/share/locale/mai/LC_MESSAGES/glib20.mo +0 -0
- data/vendor/local/share/locale/mg/LC_MESSAGES/glib20.mo +0 -0
- data/vendor/local/share/locale/mk/LC_MESSAGES/glib20.mo +0 -0
- data/vendor/local/share/locale/ml/LC_MESSAGES/glib20.mo +0 -0
- data/vendor/local/share/locale/mn/LC_MESSAGES/glib20.mo +0 -0
- data/vendor/local/share/locale/mr/LC_MESSAGES/glib20.mo +0 -0
- data/vendor/local/share/locale/ms/LC_MESSAGES/glib20.mo +0 -0
- data/vendor/local/share/locale/nb/LC_MESSAGES/gettext-runtime.mo +0 -0
- data/vendor/local/share/locale/nb/LC_MESSAGES/glib20.mo +0 -0
- data/vendor/local/share/locale/nds/LC_MESSAGES/glib20.mo +0 -0
- data/vendor/local/share/locale/ne/LC_MESSAGES/glib20.mo +0 -0
- data/vendor/local/share/locale/nl/LC_MESSAGES/gettext-runtime.mo +0 -0
- data/vendor/local/share/locale/nl/LC_MESSAGES/glib20.mo +0 -0
- data/vendor/local/share/locale/nn/LC_MESSAGES/gettext-runtime.mo +0 -0
- data/vendor/local/share/locale/nn/LC_MESSAGES/glib20.mo +0 -0
- data/vendor/local/share/locale/oc/LC_MESSAGES/glib20.mo +0 -0
- data/vendor/local/share/locale/or/LC_MESSAGES/glib20.mo +0 -0
- data/vendor/local/share/locale/pa/LC_MESSAGES/glib20.mo +0 -0
- data/vendor/local/share/locale/pl/LC_MESSAGES/gettext-runtime.mo +0 -0
- data/vendor/local/share/locale/pl/LC_MESSAGES/glib20.mo +0 -0
- data/vendor/local/share/locale/ps/LC_MESSAGES/glib20.mo +0 -0
- data/vendor/local/share/locale/pt/LC_MESSAGES/gettext-runtime.mo +0 -0
- data/vendor/local/share/locale/pt/LC_MESSAGES/glib20.mo +0 -0
- data/vendor/local/share/locale/pt_BR/LC_MESSAGES/gettext-runtime.mo +0 -0
- data/vendor/local/share/locale/pt_BR/LC_MESSAGES/glib20.mo +0 -0
- data/vendor/local/share/locale/ro/LC_MESSAGES/gettext-runtime.mo +0 -0
- data/vendor/local/share/locale/ro/LC_MESSAGES/glib20.mo +0 -0
- data/vendor/local/share/locale/ru/LC_MESSAGES/gettext-runtime.mo +0 -0
- data/vendor/local/share/locale/ru/LC_MESSAGES/glib20.mo +0 -0
- data/vendor/local/share/locale/rw/LC_MESSAGES/glib20.mo +0 -0
- data/vendor/local/share/locale/si/LC_MESSAGES/glib20.mo +0 -0
- data/vendor/local/share/locale/sk/LC_MESSAGES/gettext-runtime.mo +0 -0
- data/vendor/local/share/locale/sk/LC_MESSAGES/glib20.mo +0 -0
- data/vendor/local/share/locale/sl/LC_MESSAGES/gettext-runtime.mo +0 -0
- data/vendor/local/share/locale/sl/LC_MESSAGES/glib20.mo +0 -0
- data/vendor/local/share/locale/sq/LC_MESSAGES/glib20.mo +0 -0
- data/vendor/local/share/locale/sr/LC_MESSAGES/gettext-runtime.mo +0 -0
- data/vendor/local/share/locale/sr/LC_MESSAGES/glib20.mo +0 -0
- data/vendor/local/share/locale/sr@ije/LC_MESSAGES/glib20.mo +0 -0
- data/vendor/local/share/locale/sr@latin/LC_MESSAGES/glib20.mo +0 -0
- data/vendor/local/share/locale/sv/LC_MESSAGES/gettext-runtime.mo +0 -0
- data/vendor/local/share/locale/sv/LC_MESSAGES/glib20.mo +0 -0
- data/vendor/local/share/locale/ta/LC_MESSAGES/glib20.mo +0 -0
- data/vendor/local/share/locale/te/LC_MESSAGES/glib20.mo +0 -0
- data/vendor/local/share/locale/th/LC_MESSAGES/glib20.mo +0 -0
- data/vendor/local/share/locale/tl/LC_MESSAGES/glib20.mo +0 -0
- data/vendor/local/share/locale/tr/LC_MESSAGES/gettext-runtime.mo +0 -0
- data/vendor/local/share/locale/tr/LC_MESSAGES/glib20.mo +0 -0
- data/vendor/local/share/locale/tt/LC_MESSAGES/glib20.mo +0 -0
- data/vendor/local/share/locale/uk/LC_MESSAGES/gettext-runtime.mo +0 -0
- data/vendor/local/share/locale/uk/LC_MESSAGES/glib20.mo +0 -0
- data/vendor/local/share/locale/vi/LC_MESSAGES/gettext-runtime.mo +0 -0
- data/vendor/local/share/locale/vi/LC_MESSAGES/glib20.mo +0 -0
- data/vendor/local/share/locale/wa/LC_MESSAGES/glib20.mo +0 -0
- data/vendor/local/share/locale/xh/LC_MESSAGES/glib20.mo +0 -0
- data/vendor/local/share/locale/yi/LC_MESSAGES/glib20.mo +0 -0
- data/vendor/local/share/locale/zh_CN/LC_MESSAGES/gettext-runtime.mo +0 -0
- data/vendor/local/share/locale/zh_CN/LC_MESSAGES/glib20.mo +0 -0
- data/vendor/local/share/locale/zh_HK/LC_MESSAGES/gettext-runtime.mo +0 -0
- data/vendor/local/share/locale/zh_HK/LC_MESSAGES/glib20.mo +0 -0
- data/vendor/local/share/locale/zh_TW/LC_MESSAGES/gettext-runtime.mo +0 -0
- data/vendor/local/share/locale/zh_TW/LC_MESSAGES/glib20.mo +0 -0
- data/vendor/local/share/man/man1/envsubst.1 +0 -54
- data/vendor/local/share/man/man1/gettext.1 +0 -69
- data/vendor/local/share/man/man1/glib-genmarshal.1 +0 -312
- data/vendor/local/share/man/man1/glib-mkenums.1 +0 -246
- data/vendor/local/share/man/man1/gobject-query.1 +0 -83
- data/vendor/local/share/man/man1/ngettext.1 +0 -68
- data/vendor/local/share/man/man3/bind_textdomain_codeset.3 +0 -72
- data/vendor/local/share/man/man3/bindtextdomain.3 +0 -69
- data/vendor/local/share/man/man3/dcgettext.3 +0 -1
- data/vendor/local/share/man/man3/dcngettext.3 +0 -1
- data/vendor/local/share/man/man3/dgettext.3 +0 -1
- data/vendor/local/share/man/man3/dngettext.3 +0 -1
- data/vendor/local/share/man/man3/gettext.3 +0 -99
- data/vendor/local/share/man/man3/ngettext.3 +0 -60
- data/vendor/local/share/man/man3/textdomain.3 +0 -57
- data/vendor/local/src/tml/packaging/gettext_0.18.1.1-2_win32.log +0 -10423
- data/vendor/local/src/tml/packaging/gettext_0.18.1.1-2_win32.sh +0 -457
- data/vendor/local/src/tml/packaging/glib_2.26.0-2_win32.log +0 -2867
- data/vendor/local/src/tml/packaging/glib_2.26.0-2_win32.sh +0 -64
@@ -1,194 +0,0 @@
|
|
1
|
-
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
|
2
|
-
<html>
|
3
|
-
<head>
|
4
|
-
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
|
5
|
-
<title>Numerical Definitions</title>
|
6
|
-
<meta name="generator" content="DocBook XSL Stylesheets V1.75.2">
|
7
|
-
<link rel="home" href="index.html" title="GLib Reference Manual">
|
8
|
-
<link rel="up" href="glib-fundamentals.html" title="GLib Fundamentals">
|
9
|
-
<link rel="prev" href="glib-Byte-Order-Macros.html" title="Byte Order Macros">
|
10
|
-
<link rel="next" href="glib-Miscellaneous-Macros.html" title="Miscellaneous Macros">
|
11
|
-
<meta name="generator" content="GTK-Doc V1.15.1 (XML mode)">
|
12
|
-
<link rel="stylesheet" href="style.css" type="text/css">
|
13
|
-
</head>
|
14
|
-
<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
|
15
|
-
<table class="navigation" id="top" width="100%" summary="Navigation header" cellpadding="2" cellspacing="2">
|
16
|
-
<tr valign="middle">
|
17
|
-
<td><a accesskey="p" href="glib-Byte-Order-Macros.html"><img src="left.png" width="24" height="24" border="0" alt="Prev"></a></td>
|
18
|
-
<td><a accesskey="u" href="glib-fundamentals.html"><img src="up.png" width="24" height="24" border="0" alt="Up"></a></td>
|
19
|
-
<td><a accesskey="h" href="index.html"><img src="home.png" width="24" height="24" border="0" alt="Home"></a></td>
|
20
|
-
<th width="100%" align="center">GLib Reference Manual</th>
|
21
|
-
<td><a accesskey="n" href="glib-Miscellaneous-Macros.html"><img src="right.png" width="24" height="24" border="0" alt="Next"></a></td>
|
22
|
-
</tr>
|
23
|
-
<tr><td colspan="5" class="shortcuts">
|
24
|
-
<a href="#glib-Numerical-Definitions.synopsis" class="shortcut">Top</a>
|
25
|
-
|
|
26
|
-
<a href="#glib-Numerical-Definitions.description" class="shortcut">Description</a>
|
27
|
-
</td></tr>
|
28
|
-
</table>
|
29
|
-
<div class="refentry">
|
30
|
-
<a name="glib-Numerical-Definitions"></a><div class="titlepage"></div>
|
31
|
-
<div class="refnamediv"><table width="100%"><tr>
|
32
|
-
<td valign="top">
|
33
|
-
<h2><span class="refentrytitle"><a name="glib-Numerical-Definitions.top_of_page"></a>Numerical Definitions</span></h2>
|
34
|
-
<p>Numerical Definitions — mathematical constants, and floating point decomposition</p>
|
35
|
-
</td>
|
36
|
-
<td valign="top" align="right"></td>
|
37
|
-
</tr></table></div>
|
38
|
-
<div class="refsynopsisdiv">
|
39
|
-
<a name="glib-Numerical-Definitions.synopsis"></a><h2>Synopsis</h2>
|
40
|
-
<pre class="synopsis">
|
41
|
-
#include <glib.h>
|
42
|
-
|
43
|
-
#define <a class="link" href="glib-Numerical-Definitions.html#G-IEEE754-FLOAT-BIAS:CAPS" title="G_IEEE754_FLOAT_BIAS">G_IEEE754_FLOAT_BIAS</a>
|
44
|
-
#define <a class="link" href="glib-Numerical-Definitions.html#G-IEEE754-DOUBLE-BIAS:CAPS" title="G_IEEE754_DOUBLE_BIAS">G_IEEE754_DOUBLE_BIAS</a>
|
45
|
-
union <a class="link" href="glib-Numerical-Definitions.html#GFloatIEEE754" title="union GFloatIEEE754">GFloatIEEE754</a>;
|
46
|
-
union <a class="link" href="glib-Numerical-Definitions.html#GDoubleIEEE754" title="union GDoubleIEEE754">GDoubleIEEE754</a>;
|
47
|
-
|
48
|
-
|
49
|
-
#define <a class="link" href="glib-Numerical-Definitions.html#G-E:CAPS" title="G_E">G_E</a>
|
50
|
-
#define <a class="link" href="glib-Numerical-Definitions.html#G-LN2:CAPS" title="G_LN2">G_LN2</a>
|
51
|
-
#define <a class="link" href="glib-Numerical-Definitions.html#G-LN10:CAPS" title="G_LN10">G_LN10</a>
|
52
|
-
#define <a class="link" href="glib-Numerical-Definitions.html#G-PI:CAPS" title="G_PI">G_PI</a>
|
53
|
-
#define <a class="link" href="glib-Numerical-Definitions.html#G-PI-2:CAPS" title="G_PI_2">G_PI_2</a>
|
54
|
-
#define <a class="link" href="glib-Numerical-Definitions.html#G-PI-4:CAPS" title="G_PI_4">G_PI_4</a>
|
55
|
-
#define <a class="link" href="glib-Numerical-Definitions.html#G-SQRT2:CAPS" title="G_SQRT2">G_SQRT2</a>
|
56
|
-
#define <a class="link" href="glib-Numerical-Definitions.html#G-LOG-2-BASE-10:CAPS" title="G_LOG_2_BASE_10">G_LOG_2_BASE_10</a>
|
57
|
-
</pre>
|
58
|
-
</div>
|
59
|
-
<div class="refsect1">
|
60
|
-
<a name="glib-Numerical-Definitions.description"></a><h2>Description</h2>
|
61
|
-
<p>
|
62
|
-
GLib offers mathematical constants such as <a class="link" href="glib-Numerical-Definitions.html#G-PI:CAPS" title="G_PI"><span class="type">G_PI</span></a> for the value of pi;
|
63
|
-
many platforms have these in the C library, but some don't, the GLib
|
64
|
-
versions always exist.
|
65
|
-
</p>
|
66
|
-
<p>
|
67
|
-
The <a class="link" href="glib-Numerical-Definitions.html#GFloatIEEE754" title="union GFloatIEEE754"><span class="type">GFloatIEEE754</span></a> and <a class="link" href="glib-Numerical-Definitions.html#GDoubleIEEE754" title="union GDoubleIEEE754"><span class="type">GDoubleIEEE754</span></a> unions are used to access the
|
68
|
-
sign, mantissa and exponent of IEEE floats and doubles. These unions are
|
69
|
-
defined as appropriate for a given platform. IEEE floats and doubles are
|
70
|
-
supported (used for storage) by at least Intel, PPC and Sparc. See
|
71
|
-
<a class="ulink" href="http://en.wikipedia.org/wiki/IEEE_float" target="_top">IEEE 754-2008</a>
|
72
|
-
for more information about IEEE number formats.
|
73
|
-
</p>
|
74
|
-
</div>
|
75
|
-
<div class="refsect1">
|
76
|
-
<a name="glib-Numerical-Definitions.details"></a><h2>Details</h2>
|
77
|
-
<div class="refsect2">
|
78
|
-
<a name="G-IEEE754-FLOAT-BIAS:CAPS"></a><h3>G_IEEE754_FLOAT_BIAS</h3>
|
79
|
-
<pre class="programlisting">#define G_IEEE754_FLOAT_BIAS (127)
|
80
|
-
</pre>
|
81
|
-
<p>
|
82
|
-
The bias by which exponents in single-precision floats are offset.
|
83
|
-
</p>
|
84
|
-
</div>
|
85
|
-
<hr>
|
86
|
-
<div class="refsect2">
|
87
|
-
<a name="G-IEEE754-DOUBLE-BIAS:CAPS"></a><h3>G_IEEE754_DOUBLE_BIAS</h3>
|
88
|
-
<pre class="programlisting">#define G_IEEE754_DOUBLE_BIAS (1023)
|
89
|
-
</pre>
|
90
|
-
<p>
|
91
|
-
The bias by which exponents in double-precision floats are offset.
|
92
|
-
</p>
|
93
|
-
</div>
|
94
|
-
<hr>
|
95
|
-
<div class="refsect2">
|
96
|
-
<a name="GFloatIEEE754"></a><h3>union GFloatIEEE754</h3>
|
97
|
-
<pre class="programlisting"></pre>
|
98
|
-
<p>
|
99
|
-
The <a class="link" href="glib-Numerical-Definitions.html#GFloatIEEE754" title="union GFloatIEEE754"><span class="type">GFloatIEEE754</span></a> and <a class="link" href="glib-Numerical-Definitions.html#GDoubleIEEE754" title="union GDoubleIEEE754"><span class="type">GDoubleIEEE754</span></a> unions are used to access the sign,
|
100
|
-
mantissa and exponent of IEEE floats and doubles. These unions are defined
|
101
|
-
as appropriate for a given platform. IEEE floats and doubles are supported
|
102
|
-
(used for storage) by at least Intel, PPC and Sparc.
|
103
|
-
</p>
|
104
|
-
</div>
|
105
|
-
<hr>
|
106
|
-
<div class="refsect2">
|
107
|
-
<a name="GDoubleIEEE754"></a><h3>union GDoubleIEEE754</h3>
|
108
|
-
<pre class="programlisting"></pre>
|
109
|
-
<p>
|
110
|
-
The <a class="link" href="glib-Numerical-Definitions.html#GFloatIEEE754" title="union GFloatIEEE754"><span class="type">GFloatIEEE754</span></a> and <a class="link" href="glib-Numerical-Definitions.html#GDoubleIEEE754" title="union GDoubleIEEE754"><span class="type">GDoubleIEEE754</span></a> unions are used to access the sign,
|
111
|
-
mantissa and exponent of IEEE floats and doubles. These unions are defined
|
112
|
-
as appropriate for a given platform. IEEE floats and doubles are supported
|
113
|
-
(used for storage) by at least Intel, PPC and Sparc.
|
114
|
-
</p>
|
115
|
-
</div>
|
116
|
-
<hr>
|
117
|
-
<div class="refsect2">
|
118
|
-
<a name="G-E:CAPS"></a><h3>G_E</h3>
|
119
|
-
<pre class="programlisting">#define G_E 2.7182818284590452353602874713526624977572470937000
|
120
|
-
</pre>
|
121
|
-
<p>
|
122
|
-
The base of natural logarithms.
|
123
|
-
</p>
|
124
|
-
</div>
|
125
|
-
<hr>
|
126
|
-
<div class="refsect2">
|
127
|
-
<a name="G-LN2:CAPS"></a><h3>G_LN2</h3>
|
128
|
-
<pre class="programlisting">#define G_LN2 0.69314718055994530941723212145817656807550013436026
|
129
|
-
</pre>
|
130
|
-
<p>
|
131
|
-
The natural logarithm of 2.
|
132
|
-
</p>
|
133
|
-
</div>
|
134
|
-
<hr>
|
135
|
-
<div class="refsect2">
|
136
|
-
<a name="G-LN10:CAPS"></a><h3>G_LN10</h3>
|
137
|
-
<pre class="programlisting">#define G_LN10 2.3025850929940456840179914546843642076011014886288
|
138
|
-
</pre>
|
139
|
-
<p>
|
140
|
-
The natural logarithm of 10.
|
141
|
-
</p>
|
142
|
-
</div>
|
143
|
-
<hr>
|
144
|
-
<div class="refsect2">
|
145
|
-
<a name="G-PI:CAPS"></a><h3>G_PI</h3>
|
146
|
-
<pre class="programlisting">#define G_PI 3.1415926535897932384626433832795028841971693993751
|
147
|
-
</pre>
|
148
|
-
<p>
|
149
|
-
The value of pi (ratio of circle's circumference to its diameter).
|
150
|
-
</p>
|
151
|
-
</div>
|
152
|
-
<hr>
|
153
|
-
<div class="refsect2">
|
154
|
-
<a name="G-PI-2:CAPS"></a><h3>G_PI_2</h3>
|
155
|
-
<pre class="programlisting">#define G_PI_2 1.5707963267948966192313216916397514420985846996876
|
156
|
-
</pre>
|
157
|
-
<p>
|
158
|
-
Pi divided by 2.
|
159
|
-
</p>
|
160
|
-
</div>
|
161
|
-
<hr>
|
162
|
-
<div class="refsect2">
|
163
|
-
<a name="G-PI-4:CAPS"></a><h3>G_PI_4</h3>
|
164
|
-
<pre class="programlisting">#define G_PI_4 0.78539816339744830961566084581987572104929234984378
|
165
|
-
</pre>
|
166
|
-
<p>
|
167
|
-
Pi divided by 4.
|
168
|
-
</p>
|
169
|
-
</div>
|
170
|
-
<hr>
|
171
|
-
<div class="refsect2">
|
172
|
-
<a name="G-SQRT2:CAPS"></a><h3>G_SQRT2</h3>
|
173
|
-
<pre class="programlisting">#define G_SQRT2 1.4142135623730950488016887242096980785696718753769
|
174
|
-
</pre>
|
175
|
-
<p>
|
176
|
-
The square root of two.
|
177
|
-
</p>
|
178
|
-
</div>
|
179
|
-
<hr>
|
180
|
-
<div class="refsect2">
|
181
|
-
<a name="G-LOG-2-BASE-10:CAPS"></a><h3>G_LOG_2_BASE_10</h3>
|
182
|
-
<pre class="programlisting">#define G_LOG_2_BASE_10 (0.30102999566398119521)
|
183
|
-
</pre>
|
184
|
-
<p>
|
185
|
-
Multiplying the base 2 exponent by this number yields the base 10 exponent.
|
186
|
-
</p>
|
187
|
-
</div>
|
188
|
-
</div>
|
189
|
-
</div>
|
190
|
-
<div class="footer">
|
191
|
-
<hr>
|
192
|
-
Generated by GTK-Doc V1.15.1</div>
|
193
|
-
</body>
|
194
|
-
</html>
|
@@ -1,2745 +0,0 @@
|
|
1
|
-
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
|
2
|
-
<html>
|
3
|
-
<head>
|
4
|
-
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
|
5
|
-
<title>Perl-compatible regular expressions</title>
|
6
|
-
<meta name="generator" content="DocBook XSL Stylesheets V1.75.2">
|
7
|
-
<link rel="home" href="index.html" title="GLib Reference Manual">
|
8
|
-
<link rel="up" href="glib-utilities.html" title="GLib Utilities">
|
9
|
-
<link rel="prev" href="glib-Glob-style-pattern-matching.html" title="Glob-style pattern matching">
|
10
|
-
<link rel="next" href="glib-Simple-XML-Subset-Parser.html" title="Simple XML Subset Parser">
|
11
|
-
<meta name="generator" content="GTK-Doc V1.15.1 (XML mode)">
|
12
|
-
<link rel="stylesheet" href="style.css" type="text/css">
|
13
|
-
</head>
|
14
|
-
<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
|
15
|
-
<table class="navigation" id="top" width="100%" summary="Navigation header" cellpadding="2" cellspacing="2">
|
16
|
-
<tr valign="middle">
|
17
|
-
<td><a accesskey="p" href="glib-Glob-style-pattern-matching.html"><img src="left.png" width="24" height="24" border="0" alt="Prev"></a></td>
|
18
|
-
<td><a accesskey="u" href="glib-utilities.html"><img src="up.png" width="24" height="24" border="0" alt="Up"></a></td>
|
19
|
-
<td><a accesskey="h" href="index.html"><img src="home.png" width="24" height="24" border="0" alt="Home"></a></td>
|
20
|
-
<th width="100%" align="center">GLib Reference Manual</th>
|
21
|
-
<td><a accesskey="n" href="glib-Simple-XML-Subset-Parser.html"><img src="right.png" width="24" height="24" border="0" alt="Next"></a></td>
|
22
|
-
</tr>
|
23
|
-
<tr><td colspan="5" class="shortcuts">
|
24
|
-
<a href="#glib-Perl-compatible-regular-expressions.synopsis" class="shortcut">Top</a>
|
25
|
-
|
|
26
|
-
<a href="#glib-Perl-compatible-regular-expressions.description" class="shortcut">Description</a>
|
27
|
-
</td></tr>
|
28
|
-
</table>
|
29
|
-
<div class="refentry">
|
30
|
-
<a name="glib-Perl-compatible-regular-expressions"></a><div class="titlepage"></div>
|
31
|
-
<div class="refnamediv"><table width="100%"><tr>
|
32
|
-
<td valign="top">
|
33
|
-
<h2><span class="refentrytitle"><a name="glib-Perl-compatible-regular-expressions.top_of_page"></a>Perl-compatible regular expressions</span></h2>
|
34
|
-
<p>Perl-compatible regular expressions — matches strings against regular expressions</p>
|
35
|
-
</td>
|
36
|
-
<td valign="top" align="right"></td>
|
37
|
-
</tr></table></div>
|
38
|
-
<div class="refsynopsisdiv">
|
39
|
-
<a name="glib-Perl-compatible-regular-expressions.synopsis"></a><h2>Synopsis</h2>
|
40
|
-
<pre class="synopsis">
|
41
|
-
#include <glib.h>
|
42
|
-
|
43
|
-
enum <a class="link" href="glib-Perl-compatible-regular-expressions.html#GRegexError" title="enum GRegexError">GRegexError</a>;
|
44
|
-
#define <a class="link" href="glib-Perl-compatible-regular-expressions.html#G-REGEX-ERROR:CAPS" title="G_REGEX_ERROR">G_REGEX_ERROR</a>
|
45
|
-
enum <a class="link" href="glib-Perl-compatible-regular-expressions.html#GRegexCompileFlags" title="enum GRegexCompileFlags">GRegexCompileFlags</a>;
|
46
|
-
enum <a class="link" href="glib-Perl-compatible-regular-expressions.html#GRegexMatchFlags" title="enum GRegexMatchFlags">GRegexMatchFlags</a>;
|
47
|
-
<a class="link" href="glib-Perl-compatible-regular-expressions.html#GRegex" title="GRegex">GRegex</a>;
|
48
|
-
<a class="link" href="glib-Basic-Types.html#gboolean" title="gboolean"><span class="returnvalue">gboolean</span></a> (<a class="link" href="glib-Perl-compatible-regular-expressions.html#GRegexEvalCallback" title="GRegexEvalCallback ()">*GRegexEvalCallback</a>) (<em class="parameter"><code>const <a class="link" href="glib-Perl-compatible-regular-expressions.html#GMatchInfo" title="GMatchInfo"><span class="type">GMatchInfo</span></a> *match_info</code></em>,
|
49
|
-
<em class="parameter"><code><a class="link" href="glib-Strings.html#GString" title="GString"><span class="type">GString</span></a> *result</code></em>,
|
50
|
-
<em class="parameter"><code><a class="link" href="glib-Basic-Types.html#gpointer" title="gpointer"><span class="type">gpointer</span></a> user_data</code></em>);
|
51
|
-
<a class="link" href="glib-Perl-compatible-regular-expressions.html#GRegex" title="GRegex"><span class="returnvalue">GRegex</span></a> * <a class="link" href="glib-Perl-compatible-regular-expressions.html#g-regex-new" title="g_regex_new ()">g_regex_new</a> (<em class="parameter"><code>const <a class="link" href="glib-Basic-Types.html#gchar" title="gchar"><span class="type">gchar</span></a> *pattern</code></em>,
|
52
|
-
<em class="parameter"><code><a class="link" href="glib-Perl-compatible-regular-expressions.html#GRegexCompileFlags" title="enum GRegexCompileFlags"><span class="type">GRegexCompileFlags</span></a> compile_options</code></em>,
|
53
|
-
<em class="parameter"><code><a class="link" href="glib-Perl-compatible-regular-expressions.html#GRegexMatchFlags" title="enum GRegexMatchFlags"><span class="type">GRegexMatchFlags</span></a> match_options</code></em>,
|
54
|
-
<em class="parameter"><code><a class="link" href="glib-Error-Reporting.html#GError" title="GError"><span class="type">GError</span></a> **error</code></em>);
|
55
|
-
<a class="link" href="glib-Perl-compatible-regular-expressions.html#GRegex" title="GRegex"><span class="returnvalue">GRegex</span></a> * <a class="link" href="glib-Perl-compatible-regular-expressions.html#g-regex-ref" title="g_regex_ref ()">g_regex_ref</a> (<em class="parameter"><code><a class="link" href="glib-Perl-compatible-regular-expressions.html#GRegex" title="GRegex"><span class="type">GRegex</span></a> *regex</code></em>);
|
56
|
-
<span class="returnvalue">void</span> <a class="link" href="glib-Perl-compatible-regular-expressions.html#g-regex-unref" title="g_regex_unref ()">g_regex_unref</a> (<em class="parameter"><code><a class="link" href="glib-Perl-compatible-regular-expressions.html#GRegex" title="GRegex"><span class="type">GRegex</span></a> *regex</code></em>);
|
57
|
-
const <a class="link" href="glib-Basic-Types.html#gchar" title="gchar"><span class="returnvalue">gchar</span></a> * <a class="link" href="glib-Perl-compatible-regular-expressions.html#g-regex-get-pattern" title="g_regex_get_pattern ()">g_regex_get_pattern</a> (<em class="parameter"><code>const <a class="link" href="glib-Perl-compatible-regular-expressions.html#GRegex" title="GRegex"><span class="type">GRegex</span></a> *regex</code></em>);
|
58
|
-
<a class="link" href="glib-Basic-Types.html#gint" title="gint"><span class="returnvalue">gint</span></a> <a class="link" href="glib-Perl-compatible-regular-expressions.html#g-regex-get-max-backref" title="g_regex_get_max_backref ()">g_regex_get_max_backref</a> (<em class="parameter"><code>const <a class="link" href="glib-Perl-compatible-regular-expressions.html#GRegex" title="GRegex"><span class="type">GRegex</span></a> *regex</code></em>);
|
59
|
-
<a class="link" href="glib-Basic-Types.html#gint" title="gint"><span class="returnvalue">gint</span></a> <a class="link" href="glib-Perl-compatible-regular-expressions.html#g-regex-get-capture-count" title="g_regex_get_capture_count ()">g_regex_get_capture_count</a> (<em class="parameter"><code>const <a class="link" href="glib-Perl-compatible-regular-expressions.html#GRegex" title="GRegex"><span class="type">GRegex</span></a> *regex</code></em>);
|
60
|
-
<a class="link" href="glib-Basic-Types.html#gint" title="gint"><span class="returnvalue">gint</span></a> <a class="link" href="glib-Perl-compatible-regular-expressions.html#g-regex-get-string-number" title="g_regex_get_string_number ()">g_regex_get_string_number</a> (<em class="parameter"><code>const <a class="link" href="glib-Perl-compatible-regular-expressions.html#GRegex" title="GRegex"><span class="type">GRegex</span></a> *regex</code></em>,
|
61
|
-
<em class="parameter"><code>const <a class="link" href="glib-Basic-Types.html#gchar" title="gchar"><span class="type">gchar</span></a> *name</code></em>);
|
62
|
-
<a class="link" href="glib-Perl-compatible-regular-expressions.html#GRegexCompileFlags" title="enum GRegexCompileFlags"><span class="returnvalue">GRegexCompileFlags</span></a> <a class="link" href="glib-Perl-compatible-regular-expressions.html#g-regex-get-compile-flags" title="g_regex_get_compile_flags ()">g_regex_get_compile_flags</a> (<em class="parameter"><code>const <a class="link" href="glib-Perl-compatible-regular-expressions.html#GRegex" title="GRegex"><span class="type">GRegex</span></a> *regex</code></em>);
|
63
|
-
<a class="link" href="glib-Perl-compatible-regular-expressions.html#GRegexMatchFlags" title="enum GRegexMatchFlags"><span class="returnvalue">GRegexMatchFlags</span></a> <a class="link" href="glib-Perl-compatible-regular-expressions.html#g-regex-get-match-flags" title="g_regex_get_match_flags ()">g_regex_get_match_flags</a> (<em class="parameter"><code>const <a class="link" href="glib-Perl-compatible-regular-expressions.html#GRegex" title="GRegex"><span class="type">GRegex</span></a> *regex</code></em>);
|
64
|
-
<a class="link" href="glib-Basic-Types.html#gchar" title="gchar"><span class="returnvalue">gchar</span></a> * <a class="link" href="glib-Perl-compatible-regular-expressions.html#g-regex-escape-string" title="g_regex_escape_string ()">g_regex_escape_string</a> (<em class="parameter"><code>const <a class="link" href="glib-Basic-Types.html#gchar" title="gchar"><span class="type">gchar</span></a> *string</code></em>,
|
65
|
-
<em class="parameter"><code><a class="link" href="glib-Basic-Types.html#gint" title="gint"><span class="type">gint</span></a> length</code></em>);
|
66
|
-
<a class="link" href="glib-Basic-Types.html#gboolean" title="gboolean"><span class="returnvalue">gboolean</span></a> <a class="link" href="glib-Perl-compatible-regular-expressions.html#g-regex-match-simple" title="g_regex_match_simple ()">g_regex_match_simple</a> (<em class="parameter"><code>const <a class="link" href="glib-Basic-Types.html#gchar" title="gchar"><span class="type">gchar</span></a> *pattern</code></em>,
|
67
|
-
<em class="parameter"><code>const <a class="link" href="glib-Basic-Types.html#gchar" title="gchar"><span class="type">gchar</span></a> *string</code></em>,
|
68
|
-
<em class="parameter"><code><a class="link" href="glib-Perl-compatible-regular-expressions.html#GRegexCompileFlags" title="enum GRegexCompileFlags"><span class="type">GRegexCompileFlags</span></a> compile_options</code></em>,
|
69
|
-
<em class="parameter"><code><a class="link" href="glib-Perl-compatible-regular-expressions.html#GRegexMatchFlags" title="enum GRegexMatchFlags"><span class="type">GRegexMatchFlags</span></a> match_options</code></em>);
|
70
|
-
<a class="link" href="glib-Basic-Types.html#gboolean" title="gboolean"><span class="returnvalue">gboolean</span></a> <a class="link" href="glib-Perl-compatible-regular-expressions.html#g-regex-match" title="g_regex_match ()">g_regex_match</a> (<em class="parameter"><code>const <a class="link" href="glib-Perl-compatible-regular-expressions.html#GRegex" title="GRegex"><span class="type">GRegex</span></a> *regex</code></em>,
|
71
|
-
<em class="parameter"><code>const <a class="link" href="glib-Basic-Types.html#gchar" title="gchar"><span class="type">gchar</span></a> *string</code></em>,
|
72
|
-
<em class="parameter"><code><a class="link" href="glib-Perl-compatible-regular-expressions.html#GRegexMatchFlags" title="enum GRegexMatchFlags"><span class="type">GRegexMatchFlags</span></a> match_options</code></em>,
|
73
|
-
<em class="parameter"><code><a class="link" href="glib-Perl-compatible-regular-expressions.html#GMatchInfo" title="GMatchInfo"><span class="type">GMatchInfo</span></a> **match_info</code></em>);
|
74
|
-
<a class="link" href="glib-Basic-Types.html#gboolean" title="gboolean"><span class="returnvalue">gboolean</span></a> <a class="link" href="glib-Perl-compatible-regular-expressions.html#g-regex-match-full" title="g_regex_match_full ()">g_regex_match_full</a> (<em class="parameter"><code>const <a class="link" href="glib-Perl-compatible-regular-expressions.html#GRegex" title="GRegex"><span class="type">GRegex</span></a> *regex</code></em>,
|
75
|
-
<em class="parameter"><code>const <a class="link" href="glib-Basic-Types.html#gchar" title="gchar"><span class="type">gchar</span></a> *string</code></em>,
|
76
|
-
<em class="parameter"><code><a class="link" href="glib-Basic-Types.html#gssize" title="gssize"><span class="type">gssize</span></a> string_len</code></em>,
|
77
|
-
<em class="parameter"><code><a class="link" href="glib-Basic-Types.html#gint" title="gint"><span class="type">gint</span></a> start_position</code></em>,
|
78
|
-
<em class="parameter"><code><a class="link" href="glib-Perl-compatible-regular-expressions.html#GRegexMatchFlags" title="enum GRegexMatchFlags"><span class="type">GRegexMatchFlags</span></a> match_options</code></em>,
|
79
|
-
<em class="parameter"><code><a class="link" href="glib-Perl-compatible-regular-expressions.html#GMatchInfo" title="GMatchInfo"><span class="type">GMatchInfo</span></a> **match_info</code></em>,
|
80
|
-
<em class="parameter"><code><a class="link" href="glib-Error-Reporting.html#GError" title="GError"><span class="type">GError</span></a> **error</code></em>);
|
81
|
-
<a class="link" href="glib-Basic-Types.html#gboolean" title="gboolean"><span class="returnvalue">gboolean</span></a> <a class="link" href="glib-Perl-compatible-regular-expressions.html#g-regex-match-all" title="g_regex_match_all ()">g_regex_match_all</a> (<em class="parameter"><code>const <a class="link" href="glib-Perl-compatible-regular-expressions.html#GRegex" title="GRegex"><span class="type">GRegex</span></a> *regex</code></em>,
|
82
|
-
<em class="parameter"><code>const <a class="link" href="glib-Basic-Types.html#gchar" title="gchar"><span class="type">gchar</span></a> *string</code></em>,
|
83
|
-
<em class="parameter"><code><a class="link" href="glib-Perl-compatible-regular-expressions.html#GRegexMatchFlags" title="enum GRegexMatchFlags"><span class="type">GRegexMatchFlags</span></a> match_options</code></em>,
|
84
|
-
<em class="parameter"><code><a class="link" href="glib-Perl-compatible-regular-expressions.html#GMatchInfo" title="GMatchInfo"><span class="type">GMatchInfo</span></a> **match_info</code></em>);
|
85
|
-
<a class="link" href="glib-Basic-Types.html#gboolean" title="gboolean"><span class="returnvalue">gboolean</span></a> <a class="link" href="glib-Perl-compatible-regular-expressions.html#g-regex-match-all-full" title="g_regex_match_all_full ()">g_regex_match_all_full</a> (<em class="parameter"><code>const <a class="link" href="glib-Perl-compatible-regular-expressions.html#GRegex" title="GRegex"><span class="type">GRegex</span></a> *regex</code></em>,
|
86
|
-
<em class="parameter"><code>const <a class="link" href="glib-Basic-Types.html#gchar" title="gchar"><span class="type">gchar</span></a> *string</code></em>,
|
87
|
-
<em class="parameter"><code><a class="link" href="glib-Basic-Types.html#gssize" title="gssize"><span class="type">gssize</span></a> string_len</code></em>,
|
88
|
-
<em class="parameter"><code><a class="link" href="glib-Basic-Types.html#gint" title="gint"><span class="type">gint</span></a> start_position</code></em>,
|
89
|
-
<em class="parameter"><code><a class="link" href="glib-Perl-compatible-regular-expressions.html#GRegexMatchFlags" title="enum GRegexMatchFlags"><span class="type">GRegexMatchFlags</span></a> match_options</code></em>,
|
90
|
-
<em class="parameter"><code><a class="link" href="glib-Perl-compatible-regular-expressions.html#GMatchInfo" title="GMatchInfo"><span class="type">GMatchInfo</span></a> **match_info</code></em>,
|
91
|
-
<em class="parameter"><code><a class="link" href="glib-Error-Reporting.html#GError" title="GError"><span class="type">GError</span></a> **error</code></em>);
|
92
|
-
<a class="link" href="glib-Basic-Types.html#gchar" title="gchar"><span class="returnvalue">gchar</span></a> ** <a class="link" href="glib-Perl-compatible-regular-expressions.html#g-regex-split-simple" title="g_regex_split_simple ()">g_regex_split_simple</a> (<em class="parameter"><code>const <a class="link" href="glib-Basic-Types.html#gchar" title="gchar"><span class="type">gchar</span></a> *pattern</code></em>,
|
93
|
-
<em class="parameter"><code>const <a class="link" href="glib-Basic-Types.html#gchar" title="gchar"><span class="type">gchar</span></a> *string</code></em>,
|
94
|
-
<em class="parameter"><code><a class="link" href="glib-Perl-compatible-regular-expressions.html#GRegexCompileFlags" title="enum GRegexCompileFlags"><span class="type">GRegexCompileFlags</span></a> compile_options</code></em>,
|
95
|
-
<em class="parameter"><code><a class="link" href="glib-Perl-compatible-regular-expressions.html#GRegexMatchFlags" title="enum GRegexMatchFlags"><span class="type">GRegexMatchFlags</span></a> match_options</code></em>);
|
96
|
-
<a class="link" href="glib-Basic-Types.html#gchar" title="gchar"><span class="returnvalue">gchar</span></a> ** <a class="link" href="glib-Perl-compatible-regular-expressions.html#g-regex-split" title="g_regex_split ()">g_regex_split</a> (<em class="parameter"><code>const <a class="link" href="glib-Perl-compatible-regular-expressions.html#GRegex" title="GRegex"><span class="type">GRegex</span></a> *regex</code></em>,
|
97
|
-
<em class="parameter"><code>const <a class="link" href="glib-Basic-Types.html#gchar" title="gchar"><span class="type">gchar</span></a> *string</code></em>,
|
98
|
-
<em class="parameter"><code><a class="link" href="glib-Perl-compatible-regular-expressions.html#GRegexMatchFlags" title="enum GRegexMatchFlags"><span class="type">GRegexMatchFlags</span></a> match_options</code></em>);
|
99
|
-
<a class="link" href="glib-Basic-Types.html#gchar" title="gchar"><span class="returnvalue">gchar</span></a> ** <a class="link" href="glib-Perl-compatible-regular-expressions.html#g-regex-split-full" title="g_regex_split_full ()">g_regex_split_full</a> (<em class="parameter"><code>const <a class="link" href="glib-Perl-compatible-regular-expressions.html#GRegex" title="GRegex"><span class="type">GRegex</span></a> *regex</code></em>,
|
100
|
-
<em class="parameter"><code>const <a class="link" href="glib-Basic-Types.html#gchar" title="gchar"><span class="type">gchar</span></a> *string</code></em>,
|
101
|
-
<em class="parameter"><code><a class="link" href="glib-Basic-Types.html#gssize" title="gssize"><span class="type">gssize</span></a> string_len</code></em>,
|
102
|
-
<em class="parameter"><code><a class="link" href="glib-Basic-Types.html#gint" title="gint"><span class="type">gint</span></a> start_position</code></em>,
|
103
|
-
<em class="parameter"><code><a class="link" href="glib-Perl-compatible-regular-expressions.html#GRegexMatchFlags" title="enum GRegexMatchFlags"><span class="type">GRegexMatchFlags</span></a> match_options</code></em>,
|
104
|
-
<em class="parameter"><code><a class="link" href="glib-Basic-Types.html#gint" title="gint"><span class="type">gint</span></a> max_tokens</code></em>,
|
105
|
-
<em class="parameter"><code><a class="link" href="glib-Error-Reporting.html#GError" title="GError"><span class="type">GError</span></a> **error</code></em>);
|
106
|
-
<a class="link" href="glib-Basic-Types.html#gchar" title="gchar"><span class="returnvalue">gchar</span></a> * <a class="link" href="glib-Perl-compatible-regular-expressions.html#g-regex-replace" title="g_regex_replace ()">g_regex_replace</a> (<em class="parameter"><code>const <a class="link" href="glib-Perl-compatible-regular-expressions.html#GRegex" title="GRegex"><span class="type">GRegex</span></a> *regex</code></em>,
|
107
|
-
<em class="parameter"><code>const <a class="link" href="glib-Basic-Types.html#gchar" title="gchar"><span class="type">gchar</span></a> *string</code></em>,
|
108
|
-
<em class="parameter"><code><a class="link" href="glib-Basic-Types.html#gssize" title="gssize"><span class="type">gssize</span></a> string_len</code></em>,
|
109
|
-
<em class="parameter"><code><a class="link" href="glib-Basic-Types.html#gint" title="gint"><span class="type">gint</span></a> start_position</code></em>,
|
110
|
-
<em class="parameter"><code>const <a class="link" href="glib-Basic-Types.html#gchar" title="gchar"><span class="type">gchar</span></a> *replacement</code></em>,
|
111
|
-
<em class="parameter"><code><a class="link" href="glib-Perl-compatible-regular-expressions.html#GRegexMatchFlags" title="enum GRegexMatchFlags"><span class="type">GRegexMatchFlags</span></a> match_options</code></em>,
|
112
|
-
<em class="parameter"><code><a class="link" href="glib-Error-Reporting.html#GError" title="GError"><span class="type">GError</span></a> **error</code></em>);
|
113
|
-
<a class="link" href="glib-Basic-Types.html#gchar" title="gchar"><span class="returnvalue">gchar</span></a> * <a class="link" href="glib-Perl-compatible-regular-expressions.html#g-regex-replace-literal" title="g_regex_replace_literal ()">g_regex_replace_literal</a> (<em class="parameter"><code>const <a class="link" href="glib-Perl-compatible-regular-expressions.html#GRegex" title="GRegex"><span class="type">GRegex</span></a> *regex</code></em>,
|
114
|
-
<em class="parameter"><code>const <a class="link" href="glib-Basic-Types.html#gchar" title="gchar"><span class="type">gchar</span></a> *string</code></em>,
|
115
|
-
<em class="parameter"><code><a class="link" href="glib-Basic-Types.html#gssize" title="gssize"><span class="type">gssize</span></a> string_len</code></em>,
|
116
|
-
<em class="parameter"><code><a class="link" href="glib-Basic-Types.html#gint" title="gint"><span class="type">gint</span></a> start_position</code></em>,
|
117
|
-
<em class="parameter"><code>const <a class="link" href="glib-Basic-Types.html#gchar" title="gchar"><span class="type">gchar</span></a> *replacement</code></em>,
|
118
|
-
<em class="parameter"><code><a class="link" href="glib-Perl-compatible-regular-expressions.html#GRegexMatchFlags" title="enum GRegexMatchFlags"><span class="type">GRegexMatchFlags</span></a> match_options</code></em>,
|
119
|
-
<em class="parameter"><code><a class="link" href="glib-Error-Reporting.html#GError" title="GError"><span class="type">GError</span></a> **error</code></em>);
|
120
|
-
<a class="link" href="glib-Basic-Types.html#gchar" title="gchar"><span class="returnvalue">gchar</span></a> * <a class="link" href="glib-Perl-compatible-regular-expressions.html#g-regex-replace-eval" title="g_regex_replace_eval ()">g_regex_replace_eval</a> (<em class="parameter"><code>const <a class="link" href="glib-Perl-compatible-regular-expressions.html#GRegex" title="GRegex"><span class="type">GRegex</span></a> *regex</code></em>,
|
121
|
-
<em class="parameter"><code>const <a class="link" href="glib-Basic-Types.html#gchar" title="gchar"><span class="type">gchar</span></a> *string</code></em>,
|
122
|
-
<em class="parameter"><code><a class="link" href="glib-Basic-Types.html#gssize" title="gssize"><span class="type">gssize</span></a> string_len</code></em>,
|
123
|
-
<em class="parameter"><code><a class="link" href="glib-Basic-Types.html#gint" title="gint"><span class="type">gint</span></a> start_position</code></em>,
|
124
|
-
<em class="parameter"><code><a class="link" href="glib-Perl-compatible-regular-expressions.html#GRegexMatchFlags" title="enum GRegexMatchFlags"><span class="type">GRegexMatchFlags</span></a> match_options</code></em>,
|
125
|
-
<em class="parameter"><code><a class="link" href="glib-Perl-compatible-regular-expressions.html#GRegexEvalCallback" title="GRegexEvalCallback ()"><span class="type">GRegexEvalCallback</span></a> eval</code></em>,
|
126
|
-
<em class="parameter"><code><a class="link" href="glib-Basic-Types.html#gpointer" title="gpointer"><span class="type">gpointer</span></a> user_data</code></em>,
|
127
|
-
<em class="parameter"><code><a class="link" href="glib-Error-Reporting.html#GError" title="GError"><span class="type">GError</span></a> **error</code></em>);
|
128
|
-
<a class="link" href="glib-Basic-Types.html#gboolean" title="gboolean"><span class="returnvalue">gboolean</span></a> <a class="link" href="glib-Perl-compatible-regular-expressions.html#g-regex-check-replacement" title="g_regex_check_replacement ()">g_regex_check_replacement</a> (<em class="parameter"><code>const <a class="link" href="glib-Basic-Types.html#gchar" title="gchar"><span class="type">gchar</span></a> *replacement</code></em>,
|
129
|
-
<em class="parameter"><code><a class="link" href="glib-Basic-Types.html#gboolean" title="gboolean"><span class="type">gboolean</span></a> *has_references</code></em>,
|
130
|
-
<em class="parameter"><code><a class="link" href="glib-Error-Reporting.html#GError" title="GError"><span class="type">GError</span></a> **error</code></em>);
|
131
|
-
<a class="link" href="glib-Perl-compatible-regular-expressions.html#GMatchInfo" title="GMatchInfo">GMatchInfo</a>;
|
132
|
-
<a class="link" href="glib-Perl-compatible-regular-expressions.html#GRegex" title="GRegex"><span class="returnvalue">GRegex</span></a> * <a class="link" href="glib-Perl-compatible-regular-expressions.html#g-match-info-get-regex" title="g_match_info_get_regex ()">g_match_info_get_regex</a> (<em class="parameter"><code>const <a class="link" href="glib-Perl-compatible-regular-expressions.html#GMatchInfo" title="GMatchInfo"><span class="type">GMatchInfo</span></a> *match_info</code></em>);
|
133
|
-
const <a class="link" href="glib-Basic-Types.html#gchar" title="gchar"><span class="returnvalue">gchar</span></a> * <a class="link" href="glib-Perl-compatible-regular-expressions.html#g-match-info-get-string" title="g_match_info_get_string ()">g_match_info_get_string</a> (<em class="parameter"><code>const <a class="link" href="glib-Perl-compatible-regular-expressions.html#GMatchInfo" title="GMatchInfo"><span class="type">GMatchInfo</span></a> *match_info</code></em>);
|
134
|
-
<span class="returnvalue">void</span> <a class="link" href="glib-Perl-compatible-regular-expressions.html#g-match-info-free" title="g_match_info_free ()">g_match_info_free</a> (<em class="parameter"><code><a class="link" href="glib-Perl-compatible-regular-expressions.html#GMatchInfo" title="GMatchInfo"><span class="type">GMatchInfo</span></a> *match_info</code></em>);
|
135
|
-
<a class="link" href="glib-Basic-Types.html#gboolean" title="gboolean"><span class="returnvalue">gboolean</span></a> <a class="link" href="glib-Perl-compatible-regular-expressions.html#g-match-info-matches" title="g_match_info_matches ()">g_match_info_matches</a> (<em class="parameter"><code>const <a class="link" href="glib-Perl-compatible-regular-expressions.html#GMatchInfo" title="GMatchInfo"><span class="type">GMatchInfo</span></a> *match_info</code></em>);
|
136
|
-
<a class="link" href="glib-Basic-Types.html#gboolean" title="gboolean"><span class="returnvalue">gboolean</span></a> <a class="link" href="glib-Perl-compatible-regular-expressions.html#g-match-info-next" title="g_match_info_next ()">g_match_info_next</a> (<em class="parameter"><code><a class="link" href="glib-Perl-compatible-regular-expressions.html#GMatchInfo" title="GMatchInfo"><span class="type">GMatchInfo</span></a> *match_info</code></em>,
|
137
|
-
<em class="parameter"><code><a class="link" href="glib-Error-Reporting.html#GError" title="GError"><span class="type">GError</span></a> **error</code></em>);
|
138
|
-
<a class="link" href="glib-Basic-Types.html#gint" title="gint"><span class="returnvalue">gint</span></a> <a class="link" href="glib-Perl-compatible-regular-expressions.html#g-match-info-get-match-count" title="g_match_info_get_match_count ()">g_match_info_get_match_count</a> (<em class="parameter"><code>const <a class="link" href="glib-Perl-compatible-regular-expressions.html#GMatchInfo" title="GMatchInfo"><span class="type">GMatchInfo</span></a> *match_info</code></em>);
|
139
|
-
<a class="link" href="glib-Basic-Types.html#gboolean" title="gboolean"><span class="returnvalue">gboolean</span></a> <a class="link" href="glib-Perl-compatible-regular-expressions.html#g-match-info-is-partial-match" title="g_match_info_is_partial_match ()">g_match_info_is_partial_match</a> (<em class="parameter"><code>const <a class="link" href="glib-Perl-compatible-regular-expressions.html#GMatchInfo" title="GMatchInfo"><span class="type">GMatchInfo</span></a> *match_info</code></em>);
|
140
|
-
<a class="link" href="glib-Basic-Types.html#gchar" title="gchar"><span class="returnvalue">gchar</span></a> * <a class="link" href="glib-Perl-compatible-regular-expressions.html#g-match-info-expand-references" title="g_match_info_expand_references ()">g_match_info_expand_references</a> (<em class="parameter"><code>const <a class="link" href="glib-Perl-compatible-regular-expressions.html#GMatchInfo" title="GMatchInfo"><span class="type">GMatchInfo</span></a> *match_info</code></em>,
|
141
|
-
<em class="parameter"><code>const <a class="link" href="glib-Basic-Types.html#gchar" title="gchar"><span class="type">gchar</span></a> *string_to_expand</code></em>,
|
142
|
-
<em class="parameter"><code><a class="link" href="glib-Error-Reporting.html#GError" title="GError"><span class="type">GError</span></a> **error</code></em>);
|
143
|
-
<a class="link" href="glib-Basic-Types.html#gchar" title="gchar"><span class="returnvalue">gchar</span></a> * <a class="link" href="glib-Perl-compatible-regular-expressions.html#g-match-info-fetch" title="g_match_info_fetch ()">g_match_info_fetch</a> (<em class="parameter"><code>const <a class="link" href="glib-Perl-compatible-regular-expressions.html#GMatchInfo" title="GMatchInfo"><span class="type">GMatchInfo</span></a> *match_info</code></em>,
|
144
|
-
<em class="parameter"><code><a class="link" href="glib-Basic-Types.html#gint" title="gint"><span class="type">gint</span></a> match_num</code></em>);
|
145
|
-
<a class="link" href="glib-Basic-Types.html#gboolean" title="gboolean"><span class="returnvalue">gboolean</span></a> <a class="link" href="glib-Perl-compatible-regular-expressions.html#g-match-info-fetch-pos" title="g_match_info_fetch_pos ()">g_match_info_fetch_pos</a> (<em class="parameter"><code>const <a class="link" href="glib-Perl-compatible-regular-expressions.html#GMatchInfo" title="GMatchInfo"><span class="type">GMatchInfo</span></a> *match_info</code></em>,
|
146
|
-
<em class="parameter"><code><a class="link" href="glib-Basic-Types.html#gint" title="gint"><span class="type">gint</span></a> match_num</code></em>,
|
147
|
-
<em class="parameter"><code><a class="link" href="glib-Basic-Types.html#gint" title="gint"><span class="type">gint</span></a> *start_pos</code></em>,
|
148
|
-
<em class="parameter"><code><a class="link" href="glib-Basic-Types.html#gint" title="gint"><span class="type">gint</span></a> *end_pos</code></em>);
|
149
|
-
<a class="link" href="glib-Basic-Types.html#gchar" title="gchar"><span class="returnvalue">gchar</span></a> * <a class="link" href="glib-Perl-compatible-regular-expressions.html#g-match-info-fetch-named" title="g_match_info_fetch_named ()">g_match_info_fetch_named</a> (<em class="parameter"><code>const <a class="link" href="glib-Perl-compatible-regular-expressions.html#GMatchInfo" title="GMatchInfo"><span class="type">GMatchInfo</span></a> *match_info</code></em>,
|
150
|
-
<em class="parameter"><code>const <a class="link" href="glib-Basic-Types.html#gchar" title="gchar"><span class="type">gchar</span></a> *name</code></em>);
|
151
|
-
<a class="link" href="glib-Basic-Types.html#gboolean" title="gboolean"><span class="returnvalue">gboolean</span></a> <a class="link" href="glib-Perl-compatible-regular-expressions.html#g-match-info-fetch-named-pos" title="g_match_info_fetch_named_pos ()">g_match_info_fetch_named_pos</a> (<em class="parameter"><code>const <a class="link" href="glib-Perl-compatible-regular-expressions.html#GMatchInfo" title="GMatchInfo"><span class="type">GMatchInfo</span></a> *match_info</code></em>,
|
152
|
-
<em class="parameter"><code>const <a class="link" href="glib-Basic-Types.html#gchar" title="gchar"><span class="type">gchar</span></a> *name</code></em>,
|
153
|
-
<em class="parameter"><code><a class="link" href="glib-Basic-Types.html#gint" title="gint"><span class="type">gint</span></a> *start_pos</code></em>,
|
154
|
-
<em class="parameter"><code><a class="link" href="glib-Basic-Types.html#gint" title="gint"><span class="type">gint</span></a> *end_pos</code></em>);
|
155
|
-
<a class="link" href="glib-Basic-Types.html#gchar" title="gchar"><span class="returnvalue">gchar</span></a> ** <a class="link" href="glib-Perl-compatible-regular-expressions.html#g-match-info-fetch-all" title="g_match_info_fetch_all ()">g_match_info_fetch_all</a> (<em class="parameter"><code>const <a class="link" href="glib-Perl-compatible-regular-expressions.html#GMatchInfo" title="GMatchInfo"><span class="type">GMatchInfo</span></a> *match_info</code></em>);
|
156
|
-
</pre>
|
157
|
-
</div>
|
158
|
-
<div class="refsect1">
|
159
|
-
<a name="glib-Perl-compatible-regular-expressions.description"></a><h2>Description</h2>
|
160
|
-
<p>
|
161
|
-
The <code class="function">g_regex_*()</code> functions implement regular
|
162
|
-
expression pattern matching using syntax and semantics similar to
|
163
|
-
Perl regular expression.
|
164
|
-
</p>
|
165
|
-
<p>
|
166
|
-
Some functions accept a <em class="parameter"><code>start_position</code></em> argument, setting it differs
|
167
|
-
from just passing over a shortened string and setting <a class="link" href="glib-Perl-compatible-regular-expressions.html#G-REGEX-MATCH-NOTBOL:CAPS"><span class="type">G_REGEX_MATCH_NOTBOL</span></a>
|
168
|
-
in the case of a pattern that begins with any kind of lookbehind assertion.
|
169
|
-
For example, consider the pattern "\Biss\B" which finds occurrences of "iss"
|
170
|
-
in the middle of words. ("\B" matches only if the current position in the
|
171
|
-
subject is not a word boundary.) When applied to the string "Mississipi"
|
172
|
-
from the fourth byte, namely "issipi", it does not match, because "\B" is
|
173
|
-
always false at the start of the subject, which is deemed to be a word
|
174
|
-
boundary. However, if the entire string is passed , but with
|
175
|
-
<em class="parameter"><code>start_position</code></em> set to 4, it finds the second occurrence of "iss" because
|
176
|
-
it is able to look behind the starting point to discover that it is
|
177
|
-
preceded by a letter.
|
178
|
-
</p>
|
179
|
-
<p>
|
180
|
-
Note that, unless you set the <a class="link" href="glib-Perl-compatible-regular-expressions.html#G-REGEX-RAW:CAPS"><span class="type">G_REGEX_RAW</span></a> flag, all the strings passed
|
181
|
-
to these functions must be encoded in UTF-8. The lengths and the positions
|
182
|
-
inside the strings are in bytes and not in characters, so, for instance,
|
183
|
-
"\xc3\xa0" (i.e. "à") is two bytes long but it is treated as a
|
184
|
-
single character. If you set <a class="link" href="glib-Perl-compatible-regular-expressions.html#G-REGEX-RAW:CAPS"><span class="type">G_REGEX_RAW</span></a> the strings can be non-valid
|
185
|
-
UTF-8 strings and a byte is treated as a character, so "\xc3\xa0" is two
|
186
|
-
bytes and two characters long.
|
187
|
-
</p>
|
188
|
-
<p>
|
189
|
-
When matching a pattern, "\n" matches only against a "\n" character in
|
190
|
-
the string, and "\r" matches only a "\r" character. To match any newline
|
191
|
-
sequence use "\R". This particular group matches either the two-character
|
192
|
-
sequence CR + LF ("\r\n"), or one of the single characters LF (linefeed,
|
193
|
-
U+000A, "\n"), VT vertical tab, U+000B, "\v"), FF (formfeed, U+000C, "\f"),
|
194
|
-
CR (carriage return, U+000D, "\r"), NEL (next line, U+0085), LS (line
|
195
|
-
separator, U+2028), or PS (paragraph separator, U+2029).
|
196
|
-
</p>
|
197
|
-
<p>
|
198
|
-
The behaviour of the dot, circumflex, and dollar metacharacters are
|
199
|
-
affected by newline characters, the default is to recognize any newline
|
200
|
-
character (the same characters recognized by "\R"). This can be changed
|
201
|
-
with <a class="link" href="glib-Perl-compatible-regular-expressions.html#G-REGEX-NEWLINE-CR:CAPS"><span class="type">G_REGEX_NEWLINE_CR</span></a>, <a class="link" href="glib-Perl-compatible-regular-expressions.html#G-REGEX-NEWLINE-LF:CAPS"><span class="type">G_REGEX_NEWLINE_LF</span></a> and <a class="link" href="glib-Perl-compatible-regular-expressions.html#G-REGEX-NEWLINE-CRLF:CAPS"><span class="type">G_REGEX_NEWLINE_CRLF</span></a>
|
202
|
-
compile options, and with <a class="link" href="glib-Perl-compatible-regular-expressions.html#G-REGEX-MATCH-NEWLINE-ANY:CAPS"><span class="type">G_REGEX_MATCH_NEWLINE_ANY</span></a>,
|
203
|
-
<a class="link" href="glib-Perl-compatible-regular-expressions.html#G-REGEX-MATCH-NEWLINE-CR:CAPS"><span class="type">G_REGEX_MATCH_NEWLINE_CR</span></a>, <a class="link" href="glib-Perl-compatible-regular-expressions.html#G-REGEX-MATCH-NEWLINE-LF:CAPS"><span class="type">G_REGEX_MATCH_NEWLINE_LF</span></a> and
|
204
|
-
<a class="link" href="glib-Perl-compatible-regular-expressions.html#G-REGEX-MATCH-NEWLINE-CRLF:CAPS"><span class="type">G_REGEX_MATCH_NEWLINE_CRLF</span></a> match options. These settings are also
|
205
|
-
relevant when compiling a pattern if <a class="link" href="glib-Perl-compatible-regular-expressions.html#G-REGEX-EXTENDED:CAPS"><span class="type">G_REGEX_EXTENDED</span></a> is set, and an
|
206
|
-
unescaped "#" outside a character class is encountered. This indicates
|
207
|
-
a comment that lasts until after the next newline.
|
208
|
-
</p>
|
209
|
-
<p>
|
210
|
-
Creating and manipulating the same <a class="link" href="glib-Perl-compatible-regular-expressions.html#GRegex" title="GRegex"><span class="type">GRegex</span></a> structure from different
|
211
|
-
threads is not a problem as <a class="link" href="glib-Perl-compatible-regular-expressions.html#GRegex" title="GRegex"><span class="type">GRegex</span></a> does not modify its internal
|
212
|
-
state between creation and destruction, on the other hand <a class="link" href="glib-Perl-compatible-regular-expressions.html#GMatchInfo" title="GMatchInfo"><span class="type">GMatchInfo</span></a>
|
213
|
-
is not threadsafe.
|
214
|
-
</p>
|
215
|
-
<p>
|
216
|
-
The regular expressions low-level functionalities are obtained through
|
217
|
-
the excellent <a class="ulink" href="http://www.pcre.org/" target="_top">PCRE</a> library
|
218
|
-
written by Philip Hazel.
|
219
|
-
</p>
|
220
|
-
</div>
|
221
|
-
<div class="refsect1">
|
222
|
-
<a name="glib-Perl-compatible-regular-expressions.details"></a><h2>Details</h2>
|
223
|
-
<div class="refsect2">
|
224
|
-
<a name="GRegexError"></a><h3>enum GRegexError</h3>
|
225
|
-
<pre class="programlisting">typedef enum
|
226
|
-
{
|
227
|
-
G_REGEX_ERROR_COMPILE,
|
228
|
-
G_REGEX_ERROR_OPTIMIZE,
|
229
|
-
G_REGEX_ERROR_REPLACE,
|
230
|
-
G_REGEX_ERROR_MATCH,
|
231
|
-
G_REGEX_ERROR_INTERNAL,
|
232
|
-
|
233
|
-
/* These are the error codes from PCRE + 100 */
|
234
|
-
G_REGEX_ERROR_STRAY_BACKSLASH = 101,
|
235
|
-
G_REGEX_ERROR_MISSING_CONTROL_CHAR = 102,
|
236
|
-
G_REGEX_ERROR_UNRECOGNIZED_ESCAPE = 103,
|
237
|
-
G_REGEX_ERROR_QUANTIFIERS_OUT_OF_ORDER = 104,
|
238
|
-
G_REGEX_ERROR_QUANTIFIER_TOO_BIG = 105,
|
239
|
-
G_REGEX_ERROR_UNTERMINATED_CHARACTER_CLASS = 106,
|
240
|
-
G_REGEX_ERROR_INVALID_ESCAPE_IN_CHARACTER_CLASS = 107,
|
241
|
-
G_REGEX_ERROR_RANGE_OUT_OF_ORDER = 108,
|
242
|
-
G_REGEX_ERROR_NOTHING_TO_REPEAT = 109,
|
243
|
-
G_REGEX_ERROR_UNRECOGNIZED_CHARACTER = 112,
|
244
|
-
G_REGEX_ERROR_POSIX_NAMED_CLASS_OUTSIDE_CLASS = 113,
|
245
|
-
G_REGEX_ERROR_UNMATCHED_PARENTHESIS = 114,
|
246
|
-
G_REGEX_ERROR_INEXISTENT_SUBPATTERN_REFERENCE = 115,
|
247
|
-
G_REGEX_ERROR_UNTERMINATED_COMMENT = 118,
|
248
|
-
G_REGEX_ERROR_EXPRESSION_TOO_LARGE = 120,
|
249
|
-
G_REGEX_ERROR_MEMORY_ERROR = 121,
|
250
|
-
G_REGEX_ERROR_VARIABLE_LENGTH_LOOKBEHIND = 125,
|
251
|
-
G_REGEX_ERROR_MALFORMED_CONDITION = 126,
|
252
|
-
G_REGEX_ERROR_TOO_MANY_CONDITIONAL_BRANCHES = 127,
|
253
|
-
G_REGEX_ERROR_ASSERTION_EXPECTED = 128,
|
254
|
-
G_REGEX_ERROR_UNKNOWN_POSIX_CLASS_NAME = 130,
|
255
|
-
G_REGEX_ERROR_POSIX_COLLATING_ELEMENTS_NOT_SUPPORTED = 131,
|
256
|
-
G_REGEX_ERROR_HEX_CODE_TOO_LARGE = 134,
|
257
|
-
G_REGEX_ERROR_INVALID_CONDITION = 135,
|
258
|
-
G_REGEX_ERROR_SINGLE_BYTE_MATCH_IN_LOOKBEHIND = 136,
|
259
|
-
G_REGEX_ERROR_INFINITE_LOOP = 140,
|
260
|
-
G_REGEX_ERROR_MISSING_SUBPATTERN_NAME_TERMINATOR = 142,
|
261
|
-
G_REGEX_ERROR_DUPLICATE_SUBPATTERN_NAME = 143,
|
262
|
-
G_REGEX_ERROR_MALFORMED_PROPERTY = 146,
|
263
|
-
G_REGEX_ERROR_UNKNOWN_PROPERTY = 147,
|
264
|
-
G_REGEX_ERROR_SUBPATTERN_NAME_TOO_LONG = 148,
|
265
|
-
G_REGEX_ERROR_TOO_MANY_SUBPATTERNS = 149,
|
266
|
-
G_REGEX_ERROR_INVALID_OCTAL_VALUE = 151,
|
267
|
-
G_REGEX_ERROR_TOO_MANY_BRANCHES_IN_DEFINE = 154,
|
268
|
-
G_REGEX_ERROR_DEFINE_REPETION = 155,
|
269
|
-
G_REGEX_ERROR_INCONSISTENT_NEWLINE_OPTIONS = 156,
|
270
|
-
G_REGEX_ERROR_MISSING_BACK_REFERENCE = 157
|
271
|
-
} GRegexError;
|
272
|
-
</pre>
|
273
|
-
<p>
|
274
|
-
Error codes returned by regular expressions functions.
|
275
|
-
</p>
|
276
|
-
<div class="variablelist"><table border="0">
|
277
|
-
<col align="left" valign="top">
|
278
|
-
<tbody>
|
279
|
-
<tr>
|
280
|
-
<td><p><a name="G-REGEX-ERROR-COMPILE:CAPS"></a><span class="term"><code class="literal">G_REGEX_ERROR_COMPILE</code></span></p></td>
|
281
|
-
<td>Compilation of the regular expression failed.
|
282
|
-
</td>
|
283
|
-
</tr>
|
284
|
-
<tr>
|
285
|
-
<td><p><a name="G-REGEX-ERROR-OPTIMIZE:CAPS"></a><span class="term"><code class="literal">G_REGEX_ERROR_OPTIMIZE</code></span></p></td>
|
286
|
-
<td>Optimization of the regular expression failed.
|
287
|
-
</td>
|
288
|
-
</tr>
|
289
|
-
<tr>
|
290
|
-
<td><p><a name="G-REGEX-ERROR-REPLACE:CAPS"></a><span class="term"><code class="literal">G_REGEX_ERROR_REPLACE</code></span></p></td>
|
291
|
-
<td>Replacement failed due to an ill-formed replacement
|
292
|
-
string.
|
293
|
-
</td>
|
294
|
-
</tr>
|
295
|
-
<tr>
|
296
|
-
<td><p><a name="G-REGEX-ERROR-MATCH:CAPS"></a><span class="term"><code class="literal">G_REGEX_ERROR_MATCH</code></span></p></td>
|
297
|
-
<td>The match process failed.
|
298
|
-
</td>
|
299
|
-
</tr>
|
300
|
-
<tr>
|
301
|
-
<td><p><a name="G-REGEX-ERROR-INTERNAL:CAPS"></a><span class="term"><code class="literal">G_REGEX_ERROR_INTERNAL</code></span></p></td>
|
302
|
-
<td>Internal error of the regular expression engine.
|
303
|
-
Since 2.16
|
304
|
-
</td>
|
305
|
-
</tr>
|
306
|
-
<tr>
|
307
|
-
<td><p><a name="G-REGEX-ERROR-STRAY-BACKSLASH:CAPS"></a><span class="term"><code class="literal">G_REGEX_ERROR_STRAY_BACKSLASH</code></span></p></td>
|
308
|
-
<td>"\\" at end of pattern. Since 2.16
|
309
|
-
</td>
|
310
|
-
</tr>
|
311
|
-
<tr>
|
312
|
-
<td><p><a name="G-REGEX-ERROR-MISSING-CONTROL-CHAR:CAPS"></a><span class="term"><code class="literal">G_REGEX_ERROR_MISSING_CONTROL_CHAR</code></span></p></td>
|
313
|
-
<td>"\\c" at end of pattern. Since 2.16
|
314
|
-
</td>
|
315
|
-
</tr>
|
316
|
-
<tr>
|
317
|
-
<td><p><a name="G-REGEX-ERROR-UNRECOGNIZED-ESCAPE:CAPS"></a><span class="term"><code class="literal">G_REGEX_ERROR_UNRECOGNIZED_ESCAPE</code></span></p></td>
|
318
|
-
<td>Unrecognized character follows "\\".
|
319
|
-
Since 2.16
|
320
|
-
</td>
|
321
|
-
</tr>
|
322
|
-
<tr>
|
323
|
-
<td><p><a name="G-REGEX-ERROR-QUANTIFIERS-OUT-OF-ORDER:CAPS"></a><span class="term"><code class="literal">G_REGEX_ERROR_QUANTIFIERS_OUT_OF_ORDER</code></span></p></td>
|
324
|
-
<td>Numbers out of order in "{}"
|
325
|
-
quantifier. Since 2.16
|
326
|
-
</td>
|
327
|
-
</tr>
|
328
|
-
<tr>
|
329
|
-
<td><p><a name="G-REGEX-ERROR-QUANTIFIER-TOO-BIG:CAPS"></a><span class="term"><code class="literal">G_REGEX_ERROR_QUANTIFIER_TOO_BIG</code></span></p></td>
|
330
|
-
<td>Number too big in "{}" quantifier.
|
331
|
-
Since 2.16
|
332
|
-
</td>
|
333
|
-
</tr>
|
334
|
-
<tr>
|
335
|
-
<td><p><a name="G-REGEX-ERROR-UNTERMINATED-CHARACTER-CLASS:CAPS"></a><span class="term"><code class="literal">G_REGEX_ERROR_UNTERMINATED_CHARACTER_CLASS</code></span></p></td>
|
336
|
-
<td>Missing terminating "]" for
|
337
|
-
character class. Since 2.16
|
338
|
-
</td>
|
339
|
-
</tr>
|
340
|
-
<tr>
|
341
|
-
<td><p><a name="G-REGEX-ERROR-INVALID-ESCAPE-IN-CHARACTER-CLASS:CAPS"></a><span class="term"><code class="literal">G_REGEX_ERROR_INVALID_ESCAPE_IN_CHARACTER_CLASS</code></span></p></td>
|
342
|
-
<td>Invalid escape sequence
|
343
|
-
in character class. Since 2.16
|
344
|
-
</td>
|
345
|
-
</tr>
|
346
|
-
<tr>
|
347
|
-
<td><p><a name="G-REGEX-ERROR-RANGE-OUT-OF-ORDER:CAPS"></a><span class="term"><code class="literal">G_REGEX_ERROR_RANGE_OUT_OF_ORDER</code></span></p></td>
|
348
|
-
<td>Range out of order in character class.
|
349
|
-
Since 2.16
|
350
|
-
</td>
|
351
|
-
</tr>
|
352
|
-
<tr>
|
353
|
-
<td><p><a name="G-REGEX-ERROR-NOTHING-TO-REPEAT:CAPS"></a><span class="term"><code class="literal">G_REGEX_ERROR_NOTHING_TO_REPEAT</code></span></p></td>
|
354
|
-
<td>Nothing to repeat. Since 2.16
|
355
|
-
</td>
|
356
|
-
</tr>
|
357
|
-
<tr>
|
358
|
-
<td><p><a name="G-REGEX-ERROR-UNRECOGNIZED-CHARACTER:CAPS"></a><span class="term"><code class="literal">G_REGEX_ERROR_UNRECOGNIZED_CHARACTER</code></span></p></td>
|
359
|
-
<td>Unrecognized character after "(?",
|
360
|
-
"(?<" or "(?P". Since 2.16
|
361
|
-
</td>
|
362
|
-
</tr>
|
363
|
-
<tr>
|
364
|
-
<td><p><a name="G-REGEX-ERROR-POSIX-NAMED-CLASS-OUTSIDE-CLASS:CAPS"></a><span class="term"><code class="literal">G_REGEX_ERROR_POSIX_NAMED_CLASS_OUTSIDE_CLASS</code></span></p></td>
|
365
|
-
<td>POSIX named classes are
|
366
|
-
supported only within a class. Since 2.16
|
367
|
-
</td>
|
368
|
-
</tr>
|
369
|
-
<tr>
|
370
|
-
<td><p><a name="G-REGEX-ERROR-UNMATCHED-PARENTHESIS:CAPS"></a><span class="term"><code class="literal">G_REGEX_ERROR_UNMATCHED_PARENTHESIS</code></span></p></td>
|
371
|
-
<td>Missing terminating ")" or ")"
|
372
|
-
without opening "(". Since 2.16
|
373
|
-
</td>
|
374
|
-
</tr>
|
375
|
-
<tr>
|
376
|
-
<td><p><a name="G-REGEX-ERROR-INEXISTENT-SUBPATTERN-REFERENCE:CAPS"></a><span class="term"><code class="literal">G_REGEX_ERROR_INEXISTENT_SUBPATTERN_REFERENCE</code></span></p></td>
|
377
|
-
<td>Reference to non-existent
|
378
|
-
subpattern. Since 2.16
|
379
|
-
</td>
|
380
|
-
</tr>
|
381
|
-
<tr>
|
382
|
-
<td><p><a name="G-REGEX-ERROR-UNTERMINATED-COMMENT:CAPS"></a><span class="term"><code class="literal">G_REGEX_ERROR_UNTERMINATED_COMMENT</code></span></p></td>
|
383
|
-
<td>Missing terminating ")" after comment.
|
384
|
-
Since 2.16
|
385
|
-
</td>
|
386
|
-
</tr>
|
387
|
-
<tr>
|
388
|
-
<td><p><a name="G-REGEX-ERROR-EXPRESSION-TOO-LARGE:CAPS"></a><span class="term"><code class="literal">G_REGEX_ERROR_EXPRESSION_TOO_LARGE</code></span></p></td>
|
389
|
-
<td>Regular expression too large.
|
390
|
-
Since 2.16
|
391
|
-
</td>
|
392
|
-
</tr>
|
393
|
-
<tr>
|
394
|
-
<td><p><a name="G-REGEX-ERROR-MEMORY-ERROR:CAPS"></a><span class="term"><code class="literal">G_REGEX_ERROR_MEMORY_ERROR</code></span></p></td>
|
395
|
-
<td>Failed to get memory. Since 2.16
|
396
|
-
</td>
|
397
|
-
</tr>
|
398
|
-
<tr>
|
399
|
-
<td><p><a name="G-REGEX-ERROR-VARIABLE-LENGTH-LOOKBEHIND:CAPS"></a><span class="term"><code class="literal">G_REGEX_ERROR_VARIABLE_LENGTH_LOOKBEHIND</code></span></p></td>
|
400
|
-
<td>Lookbehind assertion is not
|
401
|
-
fixed length. Since 2.16
|
402
|
-
</td>
|
403
|
-
</tr>
|
404
|
-
<tr>
|
405
|
-
<td><p><a name="G-REGEX-ERROR-MALFORMED-CONDITION:CAPS"></a><span class="term"><code class="literal">G_REGEX_ERROR_MALFORMED_CONDITION</code></span></p></td>
|
406
|
-
<td>Malformed number or name after "(?(".
|
407
|
-
Since 2.16
|
408
|
-
</td>
|
409
|
-
</tr>
|
410
|
-
<tr>
|
411
|
-
<td><p><a name="G-REGEX-ERROR-TOO-MANY-CONDITIONAL-BRANCHES:CAPS"></a><span class="term"><code class="literal">G_REGEX_ERROR_TOO_MANY_CONDITIONAL_BRANCHES</code></span></p></td>
|
412
|
-
<td>Conditional group contains
|
413
|
-
more than two branches. Since 2.16
|
414
|
-
</td>
|
415
|
-
</tr>
|
416
|
-
<tr>
|
417
|
-
<td><p><a name="G-REGEX-ERROR-ASSERTION-EXPECTED:CAPS"></a><span class="term"><code class="literal">G_REGEX_ERROR_ASSERTION_EXPECTED</code></span></p></td>
|
418
|
-
<td>Assertion expected after "(?(".
|
419
|
-
Since 2.16
|
420
|
-
</td>
|
421
|
-
</tr>
|
422
|
-
<tr>
|
423
|
-
<td><p><a name="G-REGEX-ERROR-UNKNOWN-POSIX-CLASS-NAME:CAPS"></a><span class="term"><code class="literal">G_REGEX_ERROR_UNKNOWN_POSIX_CLASS_NAME</code></span></p></td>
|
424
|
-
<td>Unknown POSIX class name.
|
425
|
-
Since 2.16
|
426
|
-
</td>
|
427
|
-
</tr>
|
428
|
-
<tr>
|
429
|
-
<td><p><a name="G-REGEX-ERROR-POSIX-COLLATING-ELEMENTS-NOT-SUPPORTED:CAPS"></a><span class="term"><code class="literal">G_REGEX_ERROR_POSIX_COLLATING_ELEMENTS_NOT_SUPPORTED</code></span></p></td>
|
430
|
-
<td>POSIX collating
|
431
|
-
elements are not supported. Since 2.16
|
432
|
-
</td>
|
433
|
-
</tr>
|
434
|
-
<tr>
|
435
|
-
<td><p><a name="G-REGEX-ERROR-HEX-CODE-TOO-LARGE:CAPS"></a><span class="term"><code class="literal">G_REGEX_ERROR_HEX_CODE_TOO_LARGE</code></span></p></td>
|
436
|
-
<td>Character value in "\\x{...}" sequence
|
437
|
-
is too large. Since 2.16
|
438
|
-
</td>
|
439
|
-
</tr>
|
440
|
-
<tr>
|
441
|
-
<td><p><a name="G-REGEX-ERROR-INVALID-CONDITION:CAPS"></a><span class="term"><code class="literal">G_REGEX_ERROR_INVALID_CONDITION</code></span></p></td>
|
442
|
-
<td>Invalid condition "(?(0)". Since 2.16
|
443
|
-
</td>
|
444
|
-
</tr>
|
445
|
-
<tr>
|
446
|
-
<td><p><a name="G-REGEX-ERROR-SINGLE-BYTE-MATCH-IN-LOOKBEHIND:CAPS"></a><span class="term"><code class="literal">G_REGEX_ERROR_SINGLE_BYTE_MATCH_IN_LOOKBEHIND</code></span></p></td>
|
447
|
-
<td>\\C not allowed in
|
448
|
-
lookbehind assertion. Since 2.16
|
449
|
-
</td>
|
450
|
-
</tr>
|
451
|
-
<tr>
|
452
|
-
<td><p><a name="G-REGEX-ERROR-INFINITE-LOOP:CAPS"></a><span class="term"><code class="literal">G_REGEX_ERROR_INFINITE_LOOP</code></span></p></td>
|
453
|
-
<td>Recursive call could loop indefinitely.
|
454
|
-
Since 2.16
|
455
|
-
</td>
|
456
|
-
</tr>
|
457
|
-
<tr>
|
458
|
-
<td><p><a name="G-REGEX-ERROR-MISSING-SUBPATTERN-NAME-TERMINATOR:CAPS"></a><span class="term"><code class="literal">G_REGEX_ERROR_MISSING_SUBPATTERN_NAME_TERMINATOR</code></span></p></td>
|
459
|
-
<td>Missing terminator
|
460
|
-
in subpattern name. Since 2.16
|
461
|
-
</td>
|
462
|
-
</tr>
|
463
|
-
<tr>
|
464
|
-
<td><p><a name="G-REGEX-ERROR-DUPLICATE-SUBPATTERN-NAME:CAPS"></a><span class="term"><code class="literal">G_REGEX_ERROR_DUPLICATE_SUBPATTERN_NAME</code></span></p></td>
|
465
|
-
<td>Two named subpatterns have
|
466
|
-
the same name. Since 2.16
|
467
|
-
</td>
|
468
|
-
</tr>
|
469
|
-
<tr>
|
470
|
-
<td><p><a name="G-REGEX-ERROR-MALFORMED-PROPERTY:CAPS"></a><span class="term"><code class="literal">G_REGEX_ERROR_MALFORMED_PROPERTY</code></span></p></td>
|
471
|
-
<td>Malformed "\\P" or "\\p" sequence.
|
472
|
-
Since 2.16
|
473
|
-
</td>
|
474
|
-
</tr>
|
475
|
-
<tr>
|
476
|
-
<td><p><a name="G-REGEX-ERROR-UNKNOWN-PROPERTY:CAPS"></a><span class="term"><code class="literal">G_REGEX_ERROR_UNKNOWN_PROPERTY</code></span></p></td>
|
477
|
-
<td>Unknown property name after "\\P" or
|
478
|
-
"\\p". Since 2.16
|
479
|
-
</td>
|
480
|
-
</tr>
|
481
|
-
<tr>
|
482
|
-
<td><p><a name="G-REGEX-ERROR-SUBPATTERN-NAME-TOO-LONG:CAPS"></a><span class="term"><code class="literal">G_REGEX_ERROR_SUBPATTERN_NAME_TOO_LONG</code></span></p></td>
|
483
|
-
<td>Subpattern name is too long
|
484
|
-
(maximum 32 characters). Since 2.16
|
485
|
-
</td>
|
486
|
-
</tr>
|
487
|
-
<tr>
|
488
|
-
<td><p><a name="G-REGEX-ERROR-TOO-MANY-SUBPATTERNS:CAPS"></a><span class="term"><code class="literal">G_REGEX_ERROR_TOO_MANY_SUBPATTERNS</code></span></p></td>
|
489
|
-
<td>Too many named subpatterns (maximum
|
490
|
-
10,000). Since 2.16
|
491
|
-
</td>
|
492
|
-
</tr>
|
493
|
-
<tr>
|
494
|
-
<td><p><a name="G-REGEX-ERROR-INVALID-OCTAL-VALUE:CAPS"></a><span class="term"><code class="literal">G_REGEX_ERROR_INVALID_OCTAL_VALUE</code></span></p></td>
|
495
|
-
<td>Octal value is greater than "\\377".
|
496
|
-
Since 2.16
|
497
|
-
</td>
|
498
|
-
</tr>
|
499
|
-
<tr>
|
500
|
-
<td><p><a name="G-REGEX-ERROR-TOO-MANY-BRANCHES-IN-DEFINE:CAPS"></a><span class="term"><code class="literal">G_REGEX_ERROR_TOO_MANY_BRANCHES_IN_DEFINE</code></span></p></td>
|
501
|
-
<td>"DEFINE" group contains more
|
502
|
-
than one branch. Since 2.16
|
503
|
-
</td>
|
504
|
-
</tr>
|
505
|
-
<tr>
|
506
|
-
<td><p><a name="G-REGEX-ERROR-DEFINE-REPETION:CAPS"></a><span class="term"><code class="literal">G_REGEX_ERROR_DEFINE_REPETION</code></span></p></td>
|
507
|
-
<td>Repeating a "DEFINE" group is not allowed.
|
508
|
-
Since 2.16
|
509
|
-
</td>
|
510
|
-
</tr>
|
511
|
-
<tr>
|
512
|
-
<td><p><a name="G-REGEX-ERROR-INCONSISTENT-NEWLINE-OPTIONS:CAPS"></a><span class="term"><code class="literal">G_REGEX_ERROR_INCONSISTENT_NEWLINE_OPTIONS</code></span></p></td>
|
513
|
-
<td>Inconsistent newline options.
|
514
|
-
Since 2.16
|
515
|
-
</td>
|
516
|
-
</tr>
|
517
|
-
<tr>
|
518
|
-
<td><p><a name="G-REGEX-ERROR-MISSING-BACK-REFERENCE:CAPS"></a><span class="term"><code class="literal">G_REGEX_ERROR_MISSING_BACK_REFERENCE</code></span></p></td>
|
519
|
-
<td>"\\g" is not followed by a braced
|
520
|
-
name or an optionally braced non-zero number. Since 2.16
|
521
|
-
</td>
|
522
|
-
</tr>
|
523
|
-
</tbody>
|
524
|
-
</table></div>
|
525
|
-
<p class="since">Since 2.14</p>
|
526
|
-
</div>
|
527
|
-
<hr>
|
528
|
-
<div class="refsect2">
|
529
|
-
<a name="G-REGEX-ERROR:CAPS"></a><h3>G_REGEX_ERROR</h3>
|
530
|
-
<pre class="programlisting">#define G_REGEX_ERROR g_regex_error_quark ()
|
531
|
-
</pre>
|
532
|
-
<p>
|
533
|
-
Error domain for regular expressions. Errors in this domain will be
|
534
|
-
from the <a class="link" href="glib-Perl-compatible-regular-expressions.html#GRegexError" title="enum GRegexError"><span class="type">GRegexError</span></a> enumeration. See <a class="link" href="glib-Error-Reporting.html#GError" title="GError"><span class="type">GError</span></a> for information on
|
535
|
-
error domains.
|
536
|
-
</p>
|
537
|
-
<p class="since">Since </p>
|
538
|
-
</div>
|
539
|
-
<hr>
|
540
|
-
<div class="refsect2">
|
541
|
-
<a name="GRegexCompileFlags"></a><h3>enum GRegexCompileFlags</h3>
|
542
|
-
<pre class="programlisting">typedef enum
|
543
|
-
{
|
544
|
-
G_REGEX_CASELESS = 1 << 0,
|
545
|
-
G_REGEX_MULTILINE = 1 << 1,
|
546
|
-
G_REGEX_DOTALL = 1 << 2,
|
547
|
-
G_REGEX_EXTENDED = 1 << 3,
|
548
|
-
G_REGEX_ANCHORED = 1 << 4,
|
549
|
-
G_REGEX_DOLLAR_ENDONLY = 1 << 5,
|
550
|
-
G_REGEX_UNGREEDY = 1 << 9,
|
551
|
-
G_REGEX_RAW = 1 << 11,
|
552
|
-
G_REGEX_NO_AUTO_CAPTURE = 1 << 12,
|
553
|
-
G_REGEX_OPTIMIZE = 1 << 13,
|
554
|
-
G_REGEX_DUPNAMES = 1 << 19,
|
555
|
-
G_REGEX_NEWLINE_CR = 1 << 20,
|
556
|
-
G_REGEX_NEWLINE_LF = 1 << 21,
|
557
|
-
G_REGEX_NEWLINE_CRLF = G_REGEX_NEWLINE_CR | G_REGEX_NEWLINE_LF
|
558
|
-
} GRegexCompileFlags;
|
559
|
-
</pre>
|
560
|
-
<p>
|
561
|
-
Flags specifying compile-time options.
|
562
|
-
</p>
|
563
|
-
<div class="variablelist"><table border="0">
|
564
|
-
<col align="left" valign="top">
|
565
|
-
<tbody>
|
566
|
-
<tr>
|
567
|
-
<td><p><a name="G-REGEX-CASELESS:CAPS"></a><span class="term"><code class="literal">G_REGEX_CASELESS</code></span></p></td>
|
568
|
-
<td>Letters in the pattern match both upper- and
|
569
|
-
lowercase letters. This option can be changed within a pattern
|
570
|
-
by a "(?i)" option setting.
|
571
|
-
</td>
|
572
|
-
</tr>
|
573
|
-
<tr>
|
574
|
-
<td><p><a name="G-REGEX-MULTILINE:CAPS"></a><span class="term"><code class="literal">G_REGEX_MULTILINE</code></span></p></td>
|
575
|
-
<td>By default, GRegex treats the strings as consisting
|
576
|
-
of a single line of characters (even if it actually contains
|
577
|
-
newlines). The "start of line" metacharacter ("^") matches only
|
578
|
-
at the start of the string, while the "end of line" metacharacter
|
579
|
-
("$") matches only at the end of the string, or before a terminating
|
580
|
-
newline (unless <a class="link" href="glib-Perl-compatible-regular-expressions.html#G-REGEX-DOLLAR-ENDONLY:CAPS"><span class="type">G_REGEX_DOLLAR_ENDONLY</span></a> is set). When
|
581
|
-
<a class="link" href="glib-Perl-compatible-regular-expressions.html#G-REGEX-MULTILINE:CAPS"><span class="type">G_REGEX_MULTILINE</span></a> is set, the "start of line" and "end of line"
|
582
|
-
constructs match immediately following or immediately before any
|
583
|
-
newline in the string, respectively, as well as at the very start
|
584
|
-
and end. This can be changed within a pattern by a "(?m)" option
|
585
|
-
setting.
|
586
|
-
</td>
|
587
|
-
</tr>
|
588
|
-
<tr>
|
589
|
-
<td><p><a name="G-REGEX-DOTALL:CAPS"></a><span class="term"><code class="literal">G_REGEX_DOTALL</code></span></p></td>
|
590
|
-
<td>A dot metacharater (".") in the pattern matches all
|
591
|
-
characters, including newlines. Without it, newlines are excluded.
|
592
|
-
This option can be changed within a pattern by a ("?s") option setting.
|
593
|
-
</td>
|
594
|
-
</tr>
|
595
|
-
<tr>
|
596
|
-
<td><p><a name="G-REGEX-EXTENDED:CAPS"></a><span class="term"><code class="literal">G_REGEX_EXTENDED</code></span></p></td>
|
597
|
-
<td>Whitespace data characters in the pattern are
|
598
|
-
totally ignored except when escaped or inside a character class.
|
599
|
-
Whitespace does not include the VT character (code 11). In addition,
|
600
|
-
characters between an unescaped "#" outside a character class and
|
601
|
-
the next newline character, inclusive, are also ignored. This can
|
602
|
-
be changed within a pattern by a "(?x)" option setting.
|
603
|
-
</td>
|
604
|
-
</tr>
|
605
|
-
<tr>
|
606
|
-
<td><p><a name="G-REGEX-ANCHORED:CAPS"></a><span class="term"><code class="literal">G_REGEX_ANCHORED</code></span></p></td>
|
607
|
-
<td>The pattern is forced to be "anchored", that is,
|
608
|
-
it is constrained to match only at the first matching point in the
|
609
|
-
string that is being searched. This effect can also be achieved by
|
610
|
-
appropriate constructs in the pattern itself such as the "^"
|
611
|
-
metacharater.
|
612
|
-
</td>
|
613
|
-
</tr>
|
614
|
-
<tr>
|
615
|
-
<td><p><a name="G-REGEX-DOLLAR-ENDONLY:CAPS"></a><span class="term"><code class="literal">G_REGEX_DOLLAR_ENDONLY</code></span></p></td>
|
616
|
-
<td>A dollar metacharacter ("$") in the pattern
|
617
|
-
matches only at the end of the string. Without this option, a
|
618
|
-
dollar also matches immediately before the final character if
|
619
|
-
it is a newline (but not before any other newlines). This option
|
620
|
-
is ignored if <a class="link" href="glib-Perl-compatible-regular-expressions.html#G-REGEX-MULTILINE:CAPS"><span class="type">G_REGEX_MULTILINE</span></a> is set.
|
621
|
-
</td>
|
622
|
-
</tr>
|
623
|
-
<tr>
|
624
|
-
<td><p><a name="G-REGEX-UNGREEDY:CAPS"></a><span class="term"><code class="literal">G_REGEX_UNGREEDY</code></span></p></td>
|
625
|
-
<td>Inverts the "greediness" of the quantifiers so that
|
626
|
-
they are not greedy by default, but become greedy if followed by "?".
|
627
|
-
It can also be set by a "(?U)" option setting within the pattern.
|
628
|
-
</td>
|
629
|
-
</tr>
|
630
|
-
<tr>
|
631
|
-
<td><p><a name="G-REGEX-RAW:CAPS"></a><span class="term"><code class="literal">G_REGEX_RAW</code></span></p></td>
|
632
|
-
<td>Usually strings must be valid UTF-8 strings, using this
|
633
|
-
flag they are considered as a raw sequence of bytes.
|
634
|
-
</td>
|
635
|
-
</tr>
|
636
|
-
<tr>
|
637
|
-
<td><p><a name="G-REGEX-NO-AUTO-CAPTURE:CAPS"></a><span class="term"><code class="literal">G_REGEX_NO_AUTO_CAPTURE</code></span></p></td>
|
638
|
-
<td>Disables the use of numbered capturing
|
639
|
-
parentheses in the pattern. Any opening parenthesis that is not
|
640
|
-
followed by "?" behaves as if it were followed by "?:" but named
|
641
|
-
parentheses can still be used for capturing (and they acquire numbers
|
642
|
-
in the usual way).
|
643
|
-
</td>
|
644
|
-
</tr>
|
645
|
-
<tr>
|
646
|
-
<td><p><a name="G-REGEX-OPTIMIZE:CAPS"></a><span class="term"><code class="literal">G_REGEX_OPTIMIZE</code></span></p></td>
|
647
|
-
<td>Optimize the regular expression. If the pattern will
|
648
|
-
be used many times, then it may be worth the effort to optimize it
|
649
|
-
to improve the speed of matches.
|
650
|
-
</td>
|
651
|
-
</tr>
|
652
|
-
<tr>
|
653
|
-
<td><p><a name="G-REGEX-DUPNAMES:CAPS"></a><span class="term"><code class="literal">G_REGEX_DUPNAMES</code></span></p></td>
|
654
|
-
<td>Names used to identify capturing subpatterns need not
|
655
|
-
be unique. This can be helpful for certain types of pattern when it
|
656
|
-
is known that only one instance of the named subpattern can ever be
|
657
|
-
matched.
|
658
|
-
</td>
|
659
|
-
</tr>
|
660
|
-
<tr>
|
661
|
-
<td><p><a name="G-REGEX-NEWLINE-CR:CAPS"></a><span class="term"><code class="literal">G_REGEX_NEWLINE_CR</code></span></p></td>
|
662
|
-
<td>Usually any newline character is recognized, if this
|
663
|
-
option is set, the only recognized newline character is '\r'.
|
664
|
-
</td>
|
665
|
-
</tr>
|
666
|
-
<tr>
|
667
|
-
<td><p><a name="G-REGEX-NEWLINE-LF:CAPS"></a><span class="term"><code class="literal">G_REGEX_NEWLINE_LF</code></span></p></td>
|
668
|
-
<td>Usually any newline character is recognized, if this
|
669
|
-
option is set, the only recognized newline character is '\n'.
|
670
|
-
</td>
|
671
|
-
</tr>
|
672
|
-
<tr>
|
673
|
-
<td><p><a name="G-REGEX-NEWLINE-CRLF:CAPS"></a><span class="term"><code class="literal">G_REGEX_NEWLINE_CRLF</code></span></p></td>
|
674
|
-
<td>Usually any newline character is recognized, if this
|
675
|
-
option is set, the only recognized newline character sequence is '\r\n'.
|
676
|
-
</td>
|
677
|
-
</tr>
|
678
|
-
</tbody>
|
679
|
-
</table></div>
|
680
|
-
<p class="since">Since 2.14</p>
|
681
|
-
</div>
|
682
|
-
<hr>
|
683
|
-
<div class="refsect2">
|
684
|
-
<a name="GRegexMatchFlags"></a><h3>enum GRegexMatchFlags</h3>
|
685
|
-
<pre class="programlisting">typedef enum
|
686
|
-
{
|
687
|
-
G_REGEX_MATCH_ANCHORED = 1 << 4,
|
688
|
-
G_REGEX_MATCH_NOTBOL = 1 << 7,
|
689
|
-
G_REGEX_MATCH_NOTEOL = 1 << 8,
|
690
|
-
G_REGEX_MATCH_NOTEMPTY = 1 << 10,
|
691
|
-
G_REGEX_MATCH_PARTIAL = 1 << 15,
|
692
|
-
G_REGEX_MATCH_NEWLINE_CR = 1 << 20,
|
693
|
-
G_REGEX_MATCH_NEWLINE_LF = 1 << 21,
|
694
|
-
G_REGEX_MATCH_NEWLINE_CRLF = G_REGEX_MATCH_NEWLINE_CR | G_REGEX_MATCH_NEWLINE_LF,
|
695
|
-
G_REGEX_MATCH_NEWLINE_ANY = 1 << 22
|
696
|
-
} GRegexMatchFlags;
|
697
|
-
</pre>
|
698
|
-
<p>
|
699
|
-
Flags specifying match-time options.
|
700
|
-
</p>
|
701
|
-
<div class="variablelist"><table border="0">
|
702
|
-
<col align="left" valign="top">
|
703
|
-
<tbody>
|
704
|
-
<tr>
|
705
|
-
<td><p><a name="G-REGEX-MATCH-ANCHORED:CAPS"></a><span class="term"><code class="literal">G_REGEX_MATCH_ANCHORED</code></span></p></td>
|
706
|
-
<td>The pattern is forced to be "anchored", that is,
|
707
|
-
it is constrained to match only at the first matching point in the
|
708
|
-
string that is being searched. This effect can also be achieved by
|
709
|
-
appropriate constructs in the pattern itself such as the "^"
|
710
|
-
metacharater.
|
711
|
-
</td>
|
712
|
-
</tr>
|
713
|
-
<tr>
|
714
|
-
<td><p><a name="G-REGEX-MATCH-NOTBOL:CAPS"></a><span class="term"><code class="literal">G_REGEX_MATCH_NOTBOL</code></span></p></td>
|
715
|
-
<td>Specifies that first character of the string is
|
716
|
-
not the beginning of a line, so the circumflex metacharacter should
|
717
|
-
not match before it. Setting this without <a class="link" href="glib-Perl-compatible-regular-expressions.html#G-REGEX-MULTILINE:CAPS"><span class="type">G_REGEX_MULTILINE</span></a> (at
|
718
|
-
compile time) causes circumflex never to match. This option affects
|
719
|
-
only the behaviour of the circumflex metacharacter, it does not
|
720
|
-
affect "\A".
|
721
|
-
</td>
|
722
|
-
</tr>
|
723
|
-
<tr>
|
724
|
-
<td><p><a name="G-REGEX-MATCH-NOTEOL:CAPS"></a><span class="term"><code class="literal">G_REGEX_MATCH_NOTEOL</code></span></p></td>
|
725
|
-
<td>Specifies that the end of the subject string is
|
726
|
-
not the end of a line, so the dollar metacharacter should not match
|
727
|
-
it nor (except in multiline mode) a newline immediately before it.
|
728
|
-
Setting this without <a class="link" href="glib-Perl-compatible-regular-expressions.html#G-REGEX-MULTILINE:CAPS"><span class="type">G_REGEX_MULTILINE</span></a> (at compile time) causes
|
729
|
-
dollar never to match. This option affects only the behaviour of
|
730
|
-
the dollar metacharacter, it does not affect "\Z" or "\z".
|
731
|
-
</td>
|
732
|
-
</tr>
|
733
|
-
<tr>
|
734
|
-
<td><p><a name="G-REGEX-MATCH-NOTEMPTY:CAPS"></a><span class="term"><code class="literal">G_REGEX_MATCH_NOTEMPTY</code></span></p></td>
|
735
|
-
<td>An empty string is not considered to be a valid
|
736
|
-
match if this option is set. If there are alternatives in the pattern,
|
737
|
-
they are tried. If all the alternatives match the empty string, the
|
738
|
-
entire match fails. For example, if the pattern "a?b?" is applied to
|
739
|
-
a string not beginning with "a" or "b", it matches the empty string
|
740
|
-
at the start of the string. With this flag set, this match is not
|
741
|
-
valid, so GRegex searches further into the string for occurrences
|
742
|
-
of "a" or "b".
|
743
|
-
</td>
|
744
|
-
</tr>
|
745
|
-
<tr>
|
746
|
-
<td><p><a name="G-REGEX-MATCH-PARTIAL:CAPS"></a><span class="term"><code class="literal">G_REGEX_MATCH_PARTIAL</code></span></p></td>
|
747
|
-
<td>Turns on the partial matching feature, for more
|
748
|
-
documentation on partial matching see <a class="link" href="glib-Perl-compatible-regular-expressions.html#g-match-info-is-partial-match" title="g_match_info_is_partial_match ()"><code class="function">g_match_info_is_partial_match()</code></a>.
|
749
|
-
</td>
|
750
|
-
</tr>
|
751
|
-
<tr>
|
752
|
-
<td><p><a name="G-REGEX-MATCH-NEWLINE-CR:CAPS"></a><span class="term"><code class="literal">G_REGEX_MATCH_NEWLINE_CR</code></span></p></td>
|
753
|
-
<td>Overrides the newline definition set when
|
754
|
-
creating a new <a class="link" href="glib-Perl-compatible-regular-expressions.html#GRegex" title="GRegex"><span class="type">GRegex</span></a>, setting the '\r' character as line terminator.
|
755
|
-
</td>
|
756
|
-
</tr>
|
757
|
-
<tr>
|
758
|
-
<td><p><a name="G-REGEX-MATCH-NEWLINE-LF:CAPS"></a><span class="term"><code class="literal">G_REGEX_MATCH_NEWLINE_LF</code></span></p></td>
|
759
|
-
<td>Overrides the newline definition set when
|
760
|
-
creating a new <a class="link" href="glib-Perl-compatible-regular-expressions.html#GRegex" title="GRegex"><span class="type">GRegex</span></a>, setting the '\n' character as line terminator.
|
761
|
-
</td>
|
762
|
-
</tr>
|
763
|
-
<tr>
|
764
|
-
<td><p><a name="G-REGEX-MATCH-NEWLINE-CRLF:CAPS"></a><span class="term"><code class="literal">G_REGEX_MATCH_NEWLINE_CRLF</code></span></p></td>
|
765
|
-
<td>Overrides the newline definition set when
|
766
|
-
creating a new <a class="link" href="glib-Perl-compatible-regular-expressions.html#GRegex" title="GRegex"><span class="type">GRegex</span></a>, setting the '\r\n' characters as line terminator.
|
767
|
-
</td>
|
768
|
-
</tr>
|
769
|
-
<tr>
|
770
|
-
<td><p><a name="G-REGEX-MATCH-NEWLINE-ANY:CAPS"></a><span class="term"><code class="literal">G_REGEX_MATCH_NEWLINE_ANY</code></span></p></td>
|
771
|
-
<td>Overrides the newline definition set when
|
772
|
-
creating a new <a class="link" href="glib-Perl-compatible-regular-expressions.html#GRegex" title="GRegex"><span class="type">GRegex</span></a>, any newline character or character sequence
|
773
|
-
is recognized.
|
774
|
-
</td>
|
775
|
-
</tr>
|
776
|
-
</tbody>
|
777
|
-
</table></div>
|
778
|
-
<p class="since">Since 2.14</p>
|
779
|
-
</div>
|
780
|
-
<hr>
|
781
|
-
<div class="refsect2">
|
782
|
-
<a name="GRegex"></a><h3>GRegex</h3>
|
783
|
-
<pre class="programlisting">typedef struct _GRegex GRegex;</pre>
|
784
|
-
<p>
|
785
|
-
A GRegex is the "compiled" form of a regular expression pattern. This
|
786
|
-
structure is opaque and its fields cannot be accessed directly.
|
787
|
-
</p>
|
788
|
-
<p class="since">Since 2.14</p>
|
789
|
-
</div>
|
790
|
-
<hr>
|
791
|
-
<div class="refsect2">
|
792
|
-
<a name="GRegexEvalCallback"></a><h3>GRegexEvalCallback ()</h3>
|
793
|
-
<pre class="programlisting"><a class="link" href="glib-Basic-Types.html#gboolean" title="gboolean"><span class="returnvalue">gboolean</span></a> (*GRegexEvalCallback) (<em class="parameter"><code>const <a class="link" href="glib-Perl-compatible-regular-expressions.html#GMatchInfo" title="GMatchInfo"><span class="type">GMatchInfo</span></a> *match_info</code></em>,
|
794
|
-
<em class="parameter"><code><a class="link" href="glib-Strings.html#GString" title="GString"><span class="type">GString</span></a> *result</code></em>,
|
795
|
-
<em class="parameter"><code><a class="link" href="glib-Basic-Types.html#gpointer" title="gpointer"><span class="type">gpointer</span></a> user_data</code></em>);</pre>
|
796
|
-
<p>
|
797
|
-
Specifies the type of the function passed to <a class="link" href="glib-Perl-compatible-regular-expressions.html#g-regex-replace-eval" title="g_regex_replace_eval ()"><code class="function">g_regex_replace_eval()</code></a>.
|
798
|
-
It is called for each occurance of the pattern in the string passed
|
799
|
-
to <a class="link" href="glib-Perl-compatible-regular-expressions.html#g-regex-replace-eval" title="g_regex_replace_eval ()"><code class="function">g_regex_replace_eval()</code></a>, and it should append the replacement to
|
800
|
-
<em class="parameter"><code>result</code></em>.
|
801
|
-
</p>
|
802
|
-
<div class="variablelist"><table border="0">
|
803
|
-
<col align="left" valign="top">
|
804
|
-
<tbody>
|
805
|
-
<tr>
|
806
|
-
<td><p><span class="term"><em class="parameter"><code>match_info</code></em> :</span></p></td>
|
807
|
-
<td>the <a class="link" href="glib-Perl-compatible-regular-expressions.html#GMatchInfo" title="GMatchInfo"><span class="type">GMatchInfo</span></a> generated by the match.
|
808
|
-
Use <a class="link" href="glib-Perl-compatible-regular-expressions.html#g-match-info-get-regex" title="g_match_info_get_regex ()"><code class="function">g_match_info_get_regex()</code></a> and <a class="link" href="glib-Perl-compatible-regular-expressions.html#g-match-info-get-string" title="g_match_info_get_string ()"><code class="function">g_match_info_get_string()</code></a> if you
|
809
|
-
need the <a class="link" href="glib-Perl-compatible-regular-expressions.html#GRegex" title="GRegex"><span class="type">GRegex</span></a> or the matched string.
|
810
|
-
</td>
|
811
|
-
</tr>
|
812
|
-
<tr>
|
813
|
-
<td><p><span class="term"><em class="parameter"><code>result</code></em> :</span></p></td>
|
814
|
-
<td>a <a class="link" href="glib-Strings.html#GString" title="GString"><span class="type">GString</span></a> containing the new string
|
815
|
-
</td>
|
816
|
-
</tr>
|
817
|
-
<tr>
|
818
|
-
<td><p><span class="term"><em class="parameter"><code>user_data</code></em> :</span></p></td>
|
819
|
-
<td>user data passed to <a class="link" href="glib-Perl-compatible-regular-expressions.html#g-regex-replace-eval" title="g_regex_replace_eval ()"><code class="function">g_regex_replace_eval()</code></a>
|
820
|
-
</td>
|
821
|
-
</tr>
|
822
|
-
<tr>
|
823
|
-
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
|
824
|
-
<td> <a class="link" href="glib-Standard-Macros.html#FALSE:CAPS" title="FALSE"><code class="literal">FALSE</code></a> to continue the replacement process, <a class="link" href="glib-Standard-Macros.html#TRUE:CAPS" title="TRUE"><code class="literal">TRUE</code></a> to stop it
|
825
|
-
|
826
|
-
</td>
|
827
|
-
</tr>
|
828
|
-
</tbody>
|
829
|
-
</table></div>
|
830
|
-
<p class="since">Since 2.14</p>
|
831
|
-
</div>
|
832
|
-
<hr>
|
833
|
-
<div class="refsect2">
|
834
|
-
<a name="g-regex-new"></a><h3>g_regex_new ()</h3>
|
835
|
-
<pre class="programlisting"><a class="link" href="glib-Perl-compatible-regular-expressions.html#GRegex" title="GRegex"><span class="returnvalue">GRegex</span></a> * g_regex_new (<em class="parameter"><code>const <a class="link" href="glib-Basic-Types.html#gchar" title="gchar"><span class="type">gchar</span></a> *pattern</code></em>,
|
836
|
-
<em class="parameter"><code><a class="link" href="glib-Perl-compatible-regular-expressions.html#GRegexCompileFlags" title="enum GRegexCompileFlags"><span class="type">GRegexCompileFlags</span></a> compile_options</code></em>,
|
837
|
-
<em class="parameter"><code><a class="link" href="glib-Perl-compatible-regular-expressions.html#GRegexMatchFlags" title="enum GRegexMatchFlags"><span class="type">GRegexMatchFlags</span></a> match_options</code></em>,
|
838
|
-
<em class="parameter"><code><a class="link" href="glib-Error-Reporting.html#GError" title="GError"><span class="type">GError</span></a> **error</code></em>);</pre>
|
839
|
-
<p>
|
840
|
-
Compiles the regular expression to an internal form, and does
|
841
|
-
the initial setup of the <a class="link" href="glib-Perl-compatible-regular-expressions.html#GRegex" title="GRegex"><span class="type">GRegex</span></a> structure.
|
842
|
-
</p>
|
843
|
-
<div class="variablelist"><table border="0">
|
844
|
-
<col align="left" valign="top">
|
845
|
-
<tbody>
|
846
|
-
<tr>
|
847
|
-
<td><p><span class="term"><em class="parameter"><code>pattern</code></em> :</span></p></td>
|
848
|
-
<td>the regular expression
|
849
|
-
</td>
|
850
|
-
</tr>
|
851
|
-
<tr>
|
852
|
-
<td><p><span class="term"><em class="parameter"><code>compile_options</code></em> :</span></p></td>
|
853
|
-
<td>compile options for the regular expression, or 0
|
854
|
-
</td>
|
855
|
-
</tr>
|
856
|
-
<tr>
|
857
|
-
<td><p><span class="term"><em class="parameter"><code>match_options</code></em> :</span></p></td>
|
858
|
-
<td>match options for the regular expression, or 0
|
859
|
-
</td>
|
860
|
-
</tr>
|
861
|
-
<tr>
|
862
|
-
<td><p><span class="term"><em class="parameter"><code>error</code></em> :</span></p></td>
|
863
|
-
<td>return location for a <a class="link" href="glib-Error-Reporting.html#GError" title="GError"><span class="type">GError</span></a>
|
864
|
-
</td>
|
865
|
-
</tr>
|
866
|
-
<tr>
|
867
|
-
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
|
868
|
-
<td> a <a class="link" href="glib-Perl-compatible-regular-expressions.html#GRegex" title="GRegex"><span class="type">GRegex</span></a> structure. Call <a class="link" href="glib-Perl-compatible-regular-expressions.html#g-regex-unref" title="g_regex_unref ()"><code class="function">g_regex_unref()</code></a> when you
|
869
|
-
are done with it
|
870
|
-
|
871
|
-
</td>
|
872
|
-
</tr>
|
873
|
-
</tbody>
|
874
|
-
</table></div>
|
875
|
-
<p class="since">Since 2.14</p>
|
876
|
-
</div>
|
877
|
-
<hr>
|
878
|
-
<div class="refsect2">
|
879
|
-
<a name="g-regex-ref"></a><h3>g_regex_ref ()</h3>
|
880
|
-
<pre class="programlisting"><a class="link" href="glib-Perl-compatible-regular-expressions.html#GRegex" title="GRegex"><span class="returnvalue">GRegex</span></a> * g_regex_ref (<em class="parameter"><code><a class="link" href="glib-Perl-compatible-regular-expressions.html#GRegex" title="GRegex"><span class="type">GRegex</span></a> *regex</code></em>);</pre>
|
881
|
-
<p>
|
882
|
-
Increases reference count of <em class="parameter"><code>regex</code></em> by 1.
|
883
|
-
</p>
|
884
|
-
<div class="variablelist"><table border="0">
|
885
|
-
<col align="left" valign="top">
|
886
|
-
<tbody>
|
887
|
-
<tr>
|
888
|
-
<td><p><span class="term"><em class="parameter"><code>regex</code></em> :</span></p></td>
|
889
|
-
<td>a <a class="link" href="glib-Perl-compatible-regular-expressions.html#GRegex" title="GRegex"><span class="type">GRegex</span></a>
|
890
|
-
</td>
|
891
|
-
</tr>
|
892
|
-
<tr>
|
893
|
-
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
|
894
|
-
<td> <em class="parameter"><code>regex</code></em>
|
895
|
-
|
896
|
-
</td>
|
897
|
-
</tr>
|
898
|
-
</tbody>
|
899
|
-
</table></div>
|
900
|
-
<p class="since">Since 2.14</p>
|
901
|
-
</div>
|
902
|
-
<hr>
|
903
|
-
<div class="refsect2">
|
904
|
-
<a name="g-regex-unref"></a><h3>g_regex_unref ()</h3>
|
905
|
-
<pre class="programlisting"><span class="returnvalue">void</span> g_regex_unref (<em class="parameter"><code><a class="link" href="glib-Perl-compatible-regular-expressions.html#GRegex" title="GRegex"><span class="type">GRegex</span></a> *regex</code></em>);</pre>
|
906
|
-
<p>
|
907
|
-
Decreases reference count of <em class="parameter"><code>regex</code></em> by 1. When reference count drops
|
908
|
-
to zero, it frees all the memory associated with the regex structure.
|
909
|
-
</p>
|
910
|
-
<div class="variablelist"><table border="0">
|
911
|
-
<col align="left" valign="top">
|
912
|
-
<tbody><tr>
|
913
|
-
<td><p><span class="term"><em class="parameter"><code>regex</code></em> :</span></p></td>
|
914
|
-
<td>a <a class="link" href="glib-Perl-compatible-regular-expressions.html#GRegex" title="GRegex"><span class="type">GRegex</span></a>
|
915
|
-
</td>
|
916
|
-
</tr></tbody>
|
917
|
-
</table></div>
|
918
|
-
<p class="since">Since 2.14</p>
|
919
|
-
</div>
|
920
|
-
<hr>
|
921
|
-
<div class="refsect2">
|
922
|
-
<a name="g-regex-get-pattern"></a><h3>g_regex_get_pattern ()</h3>
|
923
|
-
<pre class="programlisting">const <a class="link" href="glib-Basic-Types.html#gchar" title="gchar"><span class="returnvalue">gchar</span></a> * g_regex_get_pattern (<em class="parameter"><code>const <a class="link" href="glib-Perl-compatible-regular-expressions.html#GRegex" title="GRegex"><span class="type">GRegex</span></a> *regex</code></em>);</pre>
|
924
|
-
<p>
|
925
|
-
Gets the pattern string associated with <em class="parameter"><code>regex</code></em>, i.e. a copy of
|
926
|
-
the string passed to <a class="link" href="glib-Perl-compatible-regular-expressions.html#g-regex-new" title="g_regex_new ()"><code class="function">g_regex_new()</code></a>.
|
927
|
-
</p>
|
928
|
-
<div class="variablelist"><table border="0">
|
929
|
-
<col align="left" valign="top">
|
930
|
-
<tbody>
|
931
|
-
<tr>
|
932
|
-
<td><p><span class="term"><em class="parameter"><code>regex</code></em> :</span></p></td>
|
933
|
-
<td>a <a class="link" href="glib-Perl-compatible-regular-expressions.html#GRegex" title="GRegex"><span class="type">GRegex</span></a> structure
|
934
|
-
</td>
|
935
|
-
</tr>
|
936
|
-
<tr>
|
937
|
-
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
|
938
|
-
<td> the pattern of <em class="parameter"><code>regex</code></em>
|
939
|
-
|
940
|
-
</td>
|
941
|
-
</tr>
|
942
|
-
</tbody>
|
943
|
-
</table></div>
|
944
|
-
<p class="since">Since 2.14</p>
|
945
|
-
</div>
|
946
|
-
<hr>
|
947
|
-
<div class="refsect2">
|
948
|
-
<a name="g-regex-get-max-backref"></a><h3>g_regex_get_max_backref ()</h3>
|
949
|
-
<pre class="programlisting"><a class="link" href="glib-Basic-Types.html#gint" title="gint"><span class="returnvalue">gint</span></a> g_regex_get_max_backref (<em class="parameter"><code>const <a class="link" href="glib-Perl-compatible-regular-expressions.html#GRegex" title="GRegex"><span class="type">GRegex</span></a> *regex</code></em>);</pre>
|
950
|
-
<p>
|
951
|
-
Returns the number of the highest back reference
|
952
|
-
in the pattern, or 0 if the pattern does not contain
|
953
|
-
back references.
|
954
|
-
</p>
|
955
|
-
<div class="variablelist"><table border="0">
|
956
|
-
<col align="left" valign="top">
|
957
|
-
<tbody>
|
958
|
-
<tr>
|
959
|
-
<td><p><span class="term"><em class="parameter"><code>regex</code></em> :</span></p></td>
|
960
|
-
<td>a <a class="link" href="glib-Perl-compatible-regular-expressions.html#GRegex" title="GRegex"><span class="type">GRegex</span></a>
|
961
|
-
</td>
|
962
|
-
</tr>
|
963
|
-
<tr>
|
964
|
-
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
|
965
|
-
<td> the number of the highest back reference
|
966
|
-
|
967
|
-
</td>
|
968
|
-
</tr>
|
969
|
-
</tbody>
|
970
|
-
</table></div>
|
971
|
-
<p class="since">Since 2.14</p>
|
972
|
-
</div>
|
973
|
-
<hr>
|
974
|
-
<div class="refsect2">
|
975
|
-
<a name="g-regex-get-capture-count"></a><h3>g_regex_get_capture_count ()</h3>
|
976
|
-
<pre class="programlisting"><a class="link" href="glib-Basic-Types.html#gint" title="gint"><span class="returnvalue">gint</span></a> g_regex_get_capture_count (<em class="parameter"><code>const <a class="link" href="glib-Perl-compatible-regular-expressions.html#GRegex" title="GRegex"><span class="type">GRegex</span></a> *regex</code></em>);</pre>
|
977
|
-
<p>
|
978
|
-
Returns the number of capturing subpatterns in the pattern.
|
979
|
-
</p>
|
980
|
-
<div class="variablelist"><table border="0">
|
981
|
-
<col align="left" valign="top">
|
982
|
-
<tbody>
|
983
|
-
<tr>
|
984
|
-
<td><p><span class="term"><em class="parameter"><code>regex</code></em> :</span></p></td>
|
985
|
-
<td>a <a class="link" href="glib-Perl-compatible-regular-expressions.html#GRegex" title="GRegex"><span class="type">GRegex</span></a>
|
986
|
-
</td>
|
987
|
-
</tr>
|
988
|
-
<tr>
|
989
|
-
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
|
990
|
-
<td> the number of capturing subpatterns
|
991
|
-
|
992
|
-
</td>
|
993
|
-
</tr>
|
994
|
-
</tbody>
|
995
|
-
</table></div>
|
996
|
-
<p class="since">Since 2.14</p>
|
997
|
-
</div>
|
998
|
-
<hr>
|
999
|
-
<div class="refsect2">
|
1000
|
-
<a name="g-regex-get-string-number"></a><h3>g_regex_get_string_number ()</h3>
|
1001
|
-
<pre class="programlisting"><a class="link" href="glib-Basic-Types.html#gint" title="gint"><span class="returnvalue">gint</span></a> g_regex_get_string_number (<em class="parameter"><code>const <a class="link" href="glib-Perl-compatible-regular-expressions.html#GRegex" title="GRegex"><span class="type">GRegex</span></a> *regex</code></em>,
|
1002
|
-
<em class="parameter"><code>const <a class="link" href="glib-Basic-Types.html#gchar" title="gchar"><span class="type">gchar</span></a> *name</code></em>);</pre>
|
1003
|
-
<p>
|
1004
|
-
Retrieves the number of the subexpression named <em class="parameter"><code>name</code></em>.
|
1005
|
-
</p>
|
1006
|
-
<div class="variablelist"><table border="0">
|
1007
|
-
<col align="left" valign="top">
|
1008
|
-
<tbody>
|
1009
|
-
<tr>
|
1010
|
-
<td><p><span class="term"><em class="parameter"><code>regex</code></em> :</span></p></td>
|
1011
|
-
<td>
|
1012
|
-
<a class="link" href="glib-Perl-compatible-regular-expressions.html#GRegex" title="GRegex"><span class="type">GRegex</span></a> structure
|
1013
|
-
</td>
|
1014
|
-
</tr>
|
1015
|
-
<tr>
|
1016
|
-
<td><p><span class="term"><em class="parameter"><code>name</code></em> :</span></p></td>
|
1017
|
-
<td>name of the subexpression
|
1018
|
-
</td>
|
1019
|
-
</tr>
|
1020
|
-
<tr>
|
1021
|
-
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
|
1022
|
-
<td> The number of the subexpression or -1 if <em class="parameter"><code>name</code></em>
|
1023
|
-
does not exists
|
1024
|
-
|
1025
|
-
</td>
|
1026
|
-
</tr>
|
1027
|
-
</tbody>
|
1028
|
-
</table></div>
|
1029
|
-
<p class="since">Since 2.14</p>
|
1030
|
-
</div>
|
1031
|
-
<hr>
|
1032
|
-
<div class="refsect2">
|
1033
|
-
<a name="g-regex-get-compile-flags"></a><h3>g_regex_get_compile_flags ()</h3>
|
1034
|
-
<pre class="programlisting"><a class="link" href="glib-Perl-compatible-regular-expressions.html#GRegexCompileFlags" title="enum GRegexCompileFlags"><span class="returnvalue">GRegexCompileFlags</span></a> g_regex_get_compile_flags (<em class="parameter"><code>const <a class="link" href="glib-Perl-compatible-regular-expressions.html#GRegex" title="GRegex"><span class="type">GRegex</span></a> *regex</code></em>);</pre>
|
1035
|
-
<p>
|
1036
|
-
Returns the compile options that <em class="parameter"><code>regex</code></em> was created with.
|
1037
|
-
</p>
|
1038
|
-
<div class="variablelist"><table border="0">
|
1039
|
-
<col align="left" valign="top">
|
1040
|
-
<tbody>
|
1041
|
-
<tr>
|
1042
|
-
<td><p><span class="term"><em class="parameter"><code>regex</code></em> :</span></p></td>
|
1043
|
-
<td>a <a class="link" href="glib-Perl-compatible-regular-expressions.html#GRegex" title="GRegex"><span class="type">GRegex</span></a>
|
1044
|
-
</td>
|
1045
|
-
</tr>
|
1046
|
-
<tr>
|
1047
|
-
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
|
1048
|
-
<td> flags from <a class="link" href="glib-Perl-compatible-regular-expressions.html#GRegexCompileFlags" title="enum GRegexCompileFlags"><span class="type">GRegexCompileFlags</span></a>
|
1049
|
-
|
1050
|
-
</td>
|
1051
|
-
</tr>
|
1052
|
-
</tbody>
|
1053
|
-
</table></div>
|
1054
|
-
<p class="since">Since 2.26</p>
|
1055
|
-
</div>
|
1056
|
-
<hr>
|
1057
|
-
<div class="refsect2">
|
1058
|
-
<a name="g-regex-get-match-flags"></a><h3>g_regex_get_match_flags ()</h3>
|
1059
|
-
<pre class="programlisting"><a class="link" href="glib-Perl-compatible-regular-expressions.html#GRegexMatchFlags" title="enum GRegexMatchFlags"><span class="returnvalue">GRegexMatchFlags</span></a> g_regex_get_match_flags (<em class="parameter"><code>const <a class="link" href="glib-Perl-compatible-regular-expressions.html#GRegex" title="GRegex"><span class="type">GRegex</span></a> *regex</code></em>);</pre>
|
1060
|
-
<p>
|
1061
|
-
Returns the match options that <em class="parameter"><code>regex</code></em> was created with.
|
1062
|
-
</p>
|
1063
|
-
<div class="variablelist"><table border="0">
|
1064
|
-
<col align="left" valign="top">
|
1065
|
-
<tbody>
|
1066
|
-
<tr>
|
1067
|
-
<td><p><span class="term"><em class="parameter"><code>regex</code></em> :</span></p></td>
|
1068
|
-
<td>a <a class="link" href="glib-Perl-compatible-regular-expressions.html#GRegex" title="GRegex"><span class="type">GRegex</span></a>
|
1069
|
-
</td>
|
1070
|
-
</tr>
|
1071
|
-
<tr>
|
1072
|
-
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
|
1073
|
-
<td> flags from <a class="link" href="glib-Perl-compatible-regular-expressions.html#GRegexMatchFlags" title="enum GRegexMatchFlags"><span class="type">GRegexMatchFlags</span></a>
|
1074
|
-
|
1075
|
-
</td>
|
1076
|
-
</tr>
|
1077
|
-
</tbody>
|
1078
|
-
</table></div>
|
1079
|
-
<p class="since">Since 2.26</p>
|
1080
|
-
</div>
|
1081
|
-
<hr>
|
1082
|
-
<div class="refsect2">
|
1083
|
-
<a name="g-regex-escape-string"></a><h3>g_regex_escape_string ()</h3>
|
1084
|
-
<pre class="programlisting"><a class="link" href="glib-Basic-Types.html#gchar" title="gchar"><span class="returnvalue">gchar</span></a> * g_regex_escape_string (<em class="parameter"><code>const <a class="link" href="glib-Basic-Types.html#gchar" title="gchar"><span class="type">gchar</span></a> *string</code></em>,
|
1085
|
-
<em class="parameter"><code><a class="link" href="glib-Basic-Types.html#gint" title="gint"><span class="type">gint</span></a> length</code></em>);</pre>
|
1086
|
-
<p>
|
1087
|
-
Escapes the special characters used for regular expressions
|
1088
|
-
in <em class="parameter"><code>string</code></em>, for instance "a.b*c" becomes "a\.b\*c". This
|
1089
|
-
function is useful to dynamically generate regular expressions.
|
1090
|
-
</p>
|
1091
|
-
<p>
|
1092
|
-
<em class="parameter"><code>string</code></em> can contain nul characters that are replaced with "\0",
|
1093
|
-
in this case remember to specify the correct length of <em class="parameter"><code>string</code></em>
|
1094
|
-
in <em class="parameter"><code>length</code></em>.
|
1095
|
-
</p>
|
1096
|
-
<div class="variablelist"><table border="0">
|
1097
|
-
<col align="left" valign="top">
|
1098
|
-
<tbody>
|
1099
|
-
<tr>
|
1100
|
-
<td><p><span class="term"><em class="parameter"><code>string</code></em> :</span></p></td>
|
1101
|
-
<td> the string to escape. <span class="annotation">[<acronym title="Parameter points to an array of items."><span class="acronym">array</span></acronym> length=length]</span>
|
1102
|
-
</td>
|
1103
|
-
</tr>
|
1104
|
-
<tr>
|
1105
|
-
<td><p><span class="term"><em class="parameter"><code>length</code></em> :</span></p></td>
|
1106
|
-
<td>the length of <em class="parameter"><code>string</code></em>, or -1 if <em class="parameter"><code>string</code></em> is nul-terminated
|
1107
|
-
</td>
|
1108
|
-
</tr>
|
1109
|
-
<tr>
|
1110
|
-
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
|
1111
|
-
<td> a newly-allocated escaped string
|
1112
|
-
|
1113
|
-
</td>
|
1114
|
-
</tr>
|
1115
|
-
</tbody>
|
1116
|
-
</table></div>
|
1117
|
-
<p class="since">Since 2.14</p>
|
1118
|
-
</div>
|
1119
|
-
<hr>
|
1120
|
-
<div class="refsect2">
|
1121
|
-
<a name="g-regex-match-simple"></a><h3>g_regex_match_simple ()</h3>
|
1122
|
-
<pre class="programlisting"><a class="link" href="glib-Basic-Types.html#gboolean" title="gboolean"><span class="returnvalue">gboolean</span></a> g_regex_match_simple (<em class="parameter"><code>const <a class="link" href="glib-Basic-Types.html#gchar" title="gchar"><span class="type">gchar</span></a> *pattern</code></em>,
|
1123
|
-
<em class="parameter"><code>const <a class="link" href="glib-Basic-Types.html#gchar" title="gchar"><span class="type">gchar</span></a> *string</code></em>,
|
1124
|
-
<em class="parameter"><code><a class="link" href="glib-Perl-compatible-regular-expressions.html#GRegexCompileFlags" title="enum GRegexCompileFlags"><span class="type">GRegexCompileFlags</span></a> compile_options</code></em>,
|
1125
|
-
<em class="parameter"><code><a class="link" href="glib-Perl-compatible-regular-expressions.html#GRegexMatchFlags" title="enum GRegexMatchFlags"><span class="type">GRegexMatchFlags</span></a> match_options</code></em>);</pre>
|
1126
|
-
<p>
|
1127
|
-
Scans for a match in <em class="parameter"><code>string</code></em> for <em class="parameter"><code>pattern</code></em>.
|
1128
|
-
</p>
|
1129
|
-
<p>
|
1130
|
-
This function is equivalent to <a class="link" href="glib-Perl-compatible-regular-expressions.html#g-regex-match" title="g_regex_match ()"><code class="function">g_regex_match()</code></a> but it does not
|
1131
|
-
require to compile the pattern with <a class="link" href="glib-Perl-compatible-regular-expressions.html#g-regex-new" title="g_regex_new ()"><code class="function">g_regex_new()</code></a>, avoiding some
|
1132
|
-
lines of code when you need just to do a match without extracting
|
1133
|
-
substrings, capture counts, and so on.
|
1134
|
-
</p>
|
1135
|
-
<p>
|
1136
|
-
If this function is to be called on the same <em class="parameter"><code>pattern</code></em> more than
|
1137
|
-
once, it's more efficient to compile the pattern once with
|
1138
|
-
<a class="link" href="glib-Perl-compatible-regular-expressions.html#g-regex-new" title="g_regex_new ()"><code class="function">g_regex_new()</code></a> and then use <a class="link" href="glib-Perl-compatible-regular-expressions.html#g-regex-match" title="g_regex_match ()"><code class="function">g_regex_match()</code></a>.
|
1139
|
-
</p>
|
1140
|
-
<div class="variablelist"><table border="0">
|
1141
|
-
<col align="left" valign="top">
|
1142
|
-
<tbody>
|
1143
|
-
<tr>
|
1144
|
-
<td><p><span class="term"><em class="parameter"><code>pattern</code></em> :</span></p></td>
|
1145
|
-
<td>the regular expression
|
1146
|
-
</td>
|
1147
|
-
</tr>
|
1148
|
-
<tr>
|
1149
|
-
<td><p><span class="term"><em class="parameter"><code>string</code></em> :</span></p></td>
|
1150
|
-
<td>the string to scan for matches
|
1151
|
-
</td>
|
1152
|
-
</tr>
|
1153
|
-
<tr>
|
1154
|
-
<td><p><span class="term"><em class="parameter"><code>compile_options</code></em> :</span></p></td>
|
1155
|
-
<td>compile options for the regular expression, or 0
|
1156
|
-
</td>
|
1157
|
-
</tr>
|
1158
|
-
<tr>
|
1159
|
-
<td><p><span class="term"><em class="parameter"><code>match_options</code></em> :</span></p></td>
|
1160
|
-
<td>match options, or 0
|
1161
|
-
</td>
|
1162
|
-
</tr>
|
1163
|
-
<tr>
|
1164
|
-
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
|
1165
|
-
<td> <a class="link" href="glib-Standard-Macros.html#TRUE:CAPS" title="TRUE"><code class="literal">TRUE</code></a> if the string matched, <a class="link" href="glib-Standard-Macros.html#FALSE:CAPS" title="FALSE"><code class="literal">FALSE</code></a> otherwise
|
1166
|
-
|
1167
|
-
</td>
|
1168
|
-
</tr>
|
1169
|
-
</tbody>
|
1170
|
-
</table></div>
|
1171
|
-
<p class="since">Since 2.14</p>
|
1172
|
-
</div>
|
1173
|
-
<hr>
|
1174
|
-
<div class="refsect2">
|
1175
|
-
<a name="g-regex-match"></a><h3>g_regex_match ()</h3>
|
1176
|
-
<pre class="programlisting"><a class="link" href="glib-Basic-Types.html#gboolean" title="gboolean"><span class="returnvalue">gboolean</span></a> g_regex_match (<em class="parameter"><code>const <a class="link" href="glib-Perl-compatible-regular-expressions.html#GRegex" title="GRegex"><span class="type">GRegex</span></a> *regex</code></em>,
|
1177
|
-
<em class="parameter"><code>const <a class="link" href="glib-Basic-Types.html#gchar" title="gchar"><span class="type">gchar</span></a> *string</code></em>,
|
1178
|
-
<em class="parameter"><code><a class="link" href="glib-Perl-compatible-regular-expressions.html#GRegexMatchFlags" title="enum GRegexMatchFlags"><span class="type">GRegexMatchFlags</span></a> match_options</code></em>,
|
1179
|
-
<em class="parameter"><code><a class="link" href="glib-Perl-compatible-regular-expressions.html#GMatchInfo" title="GMatchInfo"><span class="type">GMatchInfo</span></a> **match_info</code></em>);</pre>
|
1180
|
-
<p>
|
1181
|
-
Scans for a match in string for the pattern in <em class="parameter"><code>regex</code></em>.
|
1182
|
-
The <em class="parameter"><code>match_options</code></em> are combined with the match options specified
|
1183
|
-
when the <em class="parameter"><code>regex</code></em> structure was created, letting you have more
|
1184
|
-
flexibility in reusing <a class="link" href="glib-Perl-compatible-regular-expressions.html#GRegex" title="GRegex"><span class="type">GRegex</span></a> structures.
|
1185
|
-
</p>
|
1186
|
-
<p>
|
1187
|
-
A <a class="link" href="glib-Perl-compatible-regular-expressions.html#GMatchInfo" title="GMatchInfo"><span class="type">GMatchInfo</span></a> structure, used to get information on the match,
|
1188
|
-
is stored in <em class="parameter"><code>match_info</code></em> if not <a class="link" href="glib-Standard-Macros.html#NULL:CAPS" title="NULL"><code class="literal">NULL</code></a>. Note that if <em class="parameter"><code>match_info</code></em>
|
1189
|
-
is not <a class="link" href="glib-Standard-Macros.html#NULL:CAPS" title="NULL"><code class="literal">NULL</code></a> then it is created even if the function returns <a class="link" href="glib-Standard-Macros.html#FALSE:CAPS" title="FALSE"><code class="literal">FALSE</code></a>,
|
1190
|
-
i.e. you must free it regardless if regular expression actually matched.
|
1191
|
-
</p>
|
1192
|
-
<p>
|
1193
|
-
To retrieve all the non-overlapping matches of the pattern in
|
1194
|
-
string you can use <a class="link" href="glib-Perl-compatible-regular-expressions.html#g-match-info-next" title="g_match_info_next ()"><code class="function">g_match_info_next()</code></a>.
|
1195
|
-
</p>
|
1196
|
-
<p>
|
1197
|
-
</p>
|
1198
|
-
<div class="informalexample">
|
1199
|
-
<table class="listing_frame" border="0" cellpadding="0" cellspacing="0">
|
1200
|
-
<tbody>
|
1201
|
-
<tr>
|
1202
|
-
<td class="listing_lines" align="right"><pre>1
|
1203
|
-
2
|
1204
|
-
3
|
1205
|
-
4
|
1206
|
-
5
|
1207
|
-
6
|
1208
|
-
7
|
1209
|
-
8
|
1210
|
-
9
|
1211
|
-
10
|
1212
|
-
11
|
1213
|
-
12
|
1214
|
-
13
|
1215
|
-
14
|
1216
|
-
15
|
1217
|
-
16
|
1218
|
-
17
|
1219
|
-
18
|
1220
|
-
19</pre></td>
|
1221
|
-
<td class="listing_code"><pre class="programlisting"><span class="keyword">static</span><span class="normal"> </span><span class="type">void</span>
|
1222
|
-
<span class="function">print_uppercase_words</span><span class="normal"> </span><span class="symbol">(</span><span class="keyword">const</span><span class="normal"> </span><span class="usertype">gchar</span><span class="normal"> </span><span class="symbol">*</span><span class="normal">string</span><span class="symbol">)</span>
|
1223
|
-
<span class="cbracket">{</span>
|
1224
|
-
<span class="normal"> </span><span class="comment">/* Print all uppercase-only words. */</span>
|
1225
|
-
<span class="normal"> </span><span class="usertype">GRegex</span><span class="normal"> </span><span class="symbol">*</span><span class="normal">regex</span><span class="symbol">;</span>
|
1226
|
-
<span class="normal"> </span><span class="usertype">GMatchInfo</span><span class="normal"> </span><span class="symbol">*</span><span class="normal">match_info</span><span class="symbol">;</span>
|
1227
|
-
<span class="normal"> </span>
|
1228
|
-
<span class="normal"> regex </span><span class="symbol">=</span><span class="normal"> </span><span class="function"><a href="glib-Perl-compatible-regular-expressions.html#g-regex-new">g_regex_new</a></span><span class="normal"> </span><span class="symbol">(</span><span class="string">"[A-Z]+"</span><span class="symbol">,</span><span class="normal"> </span><span class="number">0</span><span class="symbol">,</span><span class="normal"> </span><span class="number">0</span><span class="symbol">,</span><span class="normal"> <a href="glib-Standard-Macros.html#NULL:CAPS">NULL</a></span><span class="symbol">);</span>
|
1229
|
-
<span class="normal"> </span><span class="function"><a href="glib-Perl-compatible-regular-expressions.html#g-regex-match">g_regex_match</a></span><span class="normal"> </span><span class="symbol">(</span><span class="normal">regex</span><span class="symbol">,</span><span class="normal"> string</span><span class="symbol">,</span><span class="normal"> </span><span class="number">0</span><span class="symbol">,</span><span class="normal"> </span><span class="symbol">&</span><span class="normal">match_info</span><span class="symbol">);</span>
|
1230
|
-
<span class="normal"> </span><span class="keyword">while</span><span class="normal"> </span><span class="symbol">(</span><span class="function"><a href="glib-Perl-compatible-regular-expressions.html#g-match-info-matches">g_match_info_matches</a></span><span class="normal"> </span><span class="symbol">(</span><span class="normal">match_info</span><span class="symbol">))</span>
|
1231
|
-
<span class="normal"> </span><span class="cbracket">{</span>
|
1232
|
-
<span class="normal"> </span><span class="usertype">gchar</span><span class="normal"> </span><span class="symbol">*</span><span class="normal">word </span><span class="symbol">=</span><span class="normal"> </span><span class="function"><a href="glib-Perl-compatible-regular-expressions.html#g-match-info-fetch">g_match_info_fetch</a></span><span class="normal"> </span><span class="symbol">(</span><span class="normal">match_info</span><span class="symbol">,</span><span class="normal"> </span><span class="number">0</span><span class="symbol">);</span>
|
1233
|
-
<span class="normal"> </span><span class="function"><a href="glib-Warnings-and-Assertions.html#g-print">g_print</a></span><span class="normal"> </span><span class="symbol">(</span><span class="string">"Found: %s</span><span class="specialchar">\n</span><span class="string">"</span><span class="symbol">,</span><span class="normal"> word</span><span class="symbol">);</span>
|
1234
|
-
<span class="normal"> </span><span class="function"><a href="glib-Memory-Allocation.html#g-free">g_free</a></span><span class="normal"> </span><span class="symbol">(</span><span class="normal">word</span><span class="symbol">);</span>
|
1235
|
-
<span class="normal"> </span><span class="function"><a href="glib-Perl-compatible-regular-expressions.html#g-match-info-next">g_match_info_next</a></span><span class="normal"> </span><span class="symbol">(</span><span class="normal">match_info</span><span class="symbol">,</span><span class="normal"> <a href="glib-Standard-Macros.html#NULL:CAPS">NULL</a></span><span class="symbol">);</span>
|
1236
|
-
<span class="normal"> </span><span class="cbracket">}</span>
|
1237
|
-
<span class="normal"> </span><span class="function"><a href="glib-Perl-compatible-regular-expressions.html#g-match-info-free">g_match_info_free</a></span><span class="normal"> </span><span class="symbol">(</span><span class="normal">match_info</span><span class="symbol">);</span>
|
1238
|
-
<span class="normal"> </span><span class="function"><a href="glib-Perl-compatible-regular-expressions.html#g-regex-unref">g_regex_unref</a></span><span class="normal"> </span><span class="symbol">(</span><span class="normal">regex</span><span class="symbol">);</span>
|
1239
|
-
<span class="cbracket">}</span></pre></td>
|
1240
|
-
</tr>
|
1241
|
-
</tbody>
|
1242
|
-
</table>
|
1243
|
-
</div>
|
1244
|
-
|
1245
|
-
<p>
|
1246
|
-
</p>
|
1247
|
-
<p>
|
1248
|
-
<em class="parameter"><code>string</code></em> is not copied and is used in <a class="link" href="glib-Perl-compatible-regular-expressions.html#GMatchInfo" title="GMatchInfo"><span class="type">GMatchInfo</span></a> internally. If
|
1249
|
-
you use any <a class="link" href="glib-Perl-compatible-regular-expressions.html#GMatchInfo" title="GMatchInfo"><span class="type">GMatchInfo</span></a> method (except <a class="link" href="glib-Perl-compatible-regular-expressions.html#g-match-info-free" title="g_match_info_free ()"><code class="function">g_match_info_free()</code></a>) after
|
1250
|
-
freeing or modifying <em class="parameter"><code>string</code></em> then the behaviour is undefined.
|
1251
|
-
</p>
|
1252
|
-
<div class="variablelist"><table border="0">
|
1253
|
-
<col align="left" valign="top">
|
1254
|
-
<tbody>
|
1255
|
-
<tr>
|
1256
|
-
<td><p><span class="term"><em class="parameter"><code>regex</code></em> :</span></p></td>
|
1257
|
-
<td>a <a class="link" href="glib-Perl-compatible-regular-expressions.html#GRegex" title="GRegex"><span class="type">GRegex</span></a> structure from <a class="link" href="glib-Perl-compatible-regular-expressions.html#g-regex-new" title="g_regex_new ()"><code class="function">g_regex_new()</code></a>
|
1258
|
-
</td>
|
1259
|
-
</tr>
|
1260
|
-
<tr>
|
1261
|
-
<td><p><span class="term"><em class="parameter"><code>string</code></em> :</span></p></td>
|
1262
|
-
<td>the string to scan for matches
|
1263
|
-
</td>
|
1264
|
-
</tr>
|
1265
|
-
<tr>
|
1266
|
-
<td><p><span class="term"><em class="parameter"><code>match_options</code></em> :</span></p></td>
|
1267
|
-
<td>match options
|
1268
|
-
</td>
|
1269
|
-
</tr>
|
1270
|
-
<tr>
|
1271
|
-
<td><p><span class="term"><em class="parameter"><code>match_info</code></em> :</span></p></td>
|
1272
|
-
<td> pointer to location where to store
|
1273
|
-
the <a class="link" href="glib-Perl-compatible-regular-expressions.html#GMatchInfo" title="GMatchInfo"><span class="type">GMatchInfo</span></a>, or <a class="link" href="glib-Standard-Macros.html#NULL:CAPS" title="NULL"><code class="literal">NULL</code></a> if you do not need it. <span class="annotation">[<acronym title="Parameter for returning results. Default is transfer full."><span class="acronym">out</span></acronym>][<acronym title="NULL is ok, both for passing and for returning."><span class="acronym">allow-none</span></acronym>]</span>
|
1274
|
-
</td>
|
1275
|
-
</tr>
|
1276
|
-
<tr>
|
1277
|
-
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
|
1278
|
-
<td> <a class="link" href="glib-Standard-Macros.html#TRUE:CAPS" title="TRUE"><code class="literal">TRUE</code></a> is the string matched, <a class="link" href="glib-Standard-Macros.html#FALSE:CAPS" title="FALSE"><code class="literal">FALSE</code></a> otherwise
|
1279
|
-
|
1280
|
-
</td>
|
1281
|
-
</tr>
|
1282
|
-
</tbody>
|
1283
|
-
</table></div>
|
1284
|
-
<p class="since">Since 2.14</p>
|
1285
|
-
</div>
|
1286
|
-
<hr>
|
1287
|
-
<div class="refsect2">
|
1288
|
-
<a name="g-regex-match-full"></a><h3>g_regex_match_full ()</h3>
|
1289
|
-
<pre class="programlisting"><a class="link" href="glib-Basic-Types.html#gboolean" title="gboolean"><span class="returnvalue">gboolean</span></a> g_regex_match_full (<em class="parameter"><code>const <a class="link" href="glib-Perl-compatible-regular-expressions.html#GRegex" title="GRegex"><span class="type">GRegex</span></a> *regex</code></em>,
|
1290
|
-
<em class="parameter"><code>const <a class="link" href="glib-Basic-Types.html#gchar" title="gchar"><span class="type">gchar</span></a> *string</code></em>,
|
1291
|
-
<em class="parameter"><code><a class="link" href="glib-Basic-Types.html#gssize" title="gssize"><span class="type">gssize</span></a> string_len</code></em>,
|
1292
|
-
<em class="parameter"><code><a class="link" href="glib-Basic-Types.html#gint" title="gint"><span class="type">gint</span></a> start_position</code></em>,
|
1293
|
-
<em class="parameter"><code><a class="link" href="glib-Perl-compatible-regular-expressions.html#GRegexMatchFlags" title="enum GRegexMatchFlags"><span class="type">GRegexMatchFlags</span></a> match_options</code></em>,
|
1294
|
-
<em class="parameter"><code><a class="link" href="glib-Perl-compatible-regular-expressions.html#GMatchInfo" title="GMatchInfo"><span class="type">GMatchInfo</span></a> **match_info</code></em>,
|
1295
|
-
<em class="parameter"><code><a class="link" href="glib-Error-Reporting.html#GError" title="GError"><span class="type">GError</span></a> **error</code></em>);</pre>
|
1296
|
-
<p>
|
1297
|
-
Scans for a match in string for the pattern in <em class="parameter"><code>regex</code></em>.
|
1298
|
-
The <em class="parameter"><code>match_options</code></em> are combined with the match options specified
|
1299
|
-
when the <em class="parameter"><code>regex</code></em> structure was created, letting you have more
|
1300
|
-
flexibility in reusing <a class="link" href="glib-Perl-compatible-regular-expressions.html#GRegex" title="GRegex"><span class="type">GRegex</span></a> structures.
|
1301
|
-
</p>
|
1302
|
-
<p>
|
1303
|
-
Setting <em class="parameter"><code>start_position</code></em> differs from just passing over a shortened
|
1304
|
-
string and setting <a class="link" href="glib-Perl-compatible-regular-expressions.html#G-REGEX-MATCH-NOTBOL:CAPS"><span class="type">G_REGEX_MATCH_NOTBOL</span></a> in the case of a pattern
|
1305
|
-
that begins with any kind of lookbehind assertion, such as "\b".
|
1306
|
-
</p>
|
1307
|
-
<p>
|
1308
|
-
A <a class="link" href="glib-Perl-compatible-regular-expressions.html#GMatchInfo" title="GMatchInfo"><span class="type">GMatchInfo</span></a> structure, used to get information on the match, is
|
1309
|
-
stored in <em class="parameter"><code>match_info</code></em> if not <a class="link" href="glib-Standard-Macros.html#NULL:CAPS" title="NULL"><code class="literal">NULL</code></a>. Note that if <em class="parameter"><code>match_info</code></em> is
|
1310
|
-
not <a class="link" href="glib-Standard-Macros.html#NULL:CAPS" title="NULL"><code class="literal">NULL</code></a> then it is created even if the function returns <a class="link" href="glib-Standard-Macros.html#FALSE:CAPS" title="FALSE"><code class="literal">FALSE</code></a>,
|
1311
|
-
i.e. you must free it regardless if regular expression actually
|
1312
|
-
matched.
|
1313
|
-
</p>
|
1314
|
-
<p>
|
1315
|
-
<em class="parameter"><code>string</code></em> is not copied and is used in <a class="link" href="glib-Perl-compatible-regular-expressions.html#GMatchInfo" title="GMatchInfo"><span class="type">GMatchInfo</span></a> internally. If
|
1316
|
-
you use any <a class="link" href="glib-Perl-compatible-regular-expressions.html#GMatchInfo" title="GMatchInfo"><span class="type">GMatchInfo</span></a> method (except <a class="link" href="glib-Perl-compatible-regular-expressions.html#g-match-info-free" title="g_match_info_free ()"><code class="function">g_match_info_free()</code></a>) after
|
1317
|
-
freeing or modifying <em class="parameter"><code>string</code></em> then the behaviour is undefined.
|
1318
|
-
</p>
|
1319
|
-
<p>
|
1320
|
-
To retrieve all the non-overlapping matches of the pattern in
|
1321
|
-
string you can use <a class="link" href="glib-Perl-compatible-regular-expressions.html#g-match-info-next" title="g_match_info_next ()"><code class="function">g_match_info_next()</code></a>.
|
1322
|
-
</p>
|
1323
|
-
<p>
|
1324
|
-
</p>
|
1325
|
-
<div class="informalexample">
|
1326
|
-
<table class="listing_frame" border="0" cellpadding="0" cellspacing="0">
|
1327
|
-
<tbody>
|
1328
|
-
<tr>
|
1329
|
-
<td class="listing_lines" align="right"><pre>1
|
1330
|
-
2
|
1331
|
-
3
|
1332
|
-
4
|
1333
|
-
5
|
1334
|
-
6
|
1335
|
-
7
|
1336
|
-
8
|
1337
|
-
9
|
1338
|
-
10
|
1339
|
-
11
|
1340
|
-
12
|
1341
|
-
13
|
1342
|
-
14
|
1343
|
-
15
|
1344
|
-
16
|
1345
|
-
17
|
1346
|
-
18
|
1347
|
-
19
|
1348
|
-
20
|
1349
|
-
21
|
1350
|
-
22
|
1351
|
-
23
|
1352
|
-
24
|
1353
|
-
25</pre></td>
|
1354
|
-
<td class="listing_code"><pre class="programlisting"><span class="keyword">static</span><span class="normal"> </span><span class="type">void</span>
|
1355
|
-
<span class="function">print_uppercase_words</span><span class="normal"> </span><span class="symbol">(</span><span class="keyword">const</span><span class="normal"> </span><span class="usertype">gchar</span><span class="normal"> </span><span class="symbol">*</span><span class="normal">string</span><span class="symbol">)</span>
|
1356
|
-
<span class="cbracket">{</span>
|
1357
|
-
<span class="normal"> </span><span class="comment">/* Print all uppercase-only words. */</span>
|
1358
|
-
<span class="normal"> </span><span class="usertype">GRegex</span><span class="normal"> </span><span class="symbol">*</span><span class="normal">regex</span><span class="symbol">;</span>
|
1359
|
-
<span class="normal"> </span><span class="usertype">GMatchInfo</span><span class="normal"> </span><span class="symbol">*</span><span class="normal">match_info</span><span class="symbol">;</span>
|
1360
|
-
<span class="normal"> </span><span class="usertype">GError</span><span class="normal"> </span><span class="symbol">*</span><span class="normal">error </span><span class="symbol">=</span><span class="normal"> <a href="glib-Standard-Macros.html#NULL:CAPS">NULL</a></span><span class="symbol">;</span>
|
1361
|
-
<span class="normal"> </span>
|
1362
|
-
<span class="normal"> regex </span><span class="symbol">=</span><span class="normal"> </span><span class="function"><a href="glib-Perl-compatible-regular-expressions.html#g-regex-new">g_regex_new</a></span><span class="normal"> </span><span class="symbol">(</span><span class="string">"[A-Z]+"</span><span class="symbol">,</span><span class="normal"> </span><span class="number">0</span><span class="symbol">,</span><span class="normal"> </span><span class="number">0</span><span class="symbol">,</span><span class="normal"> <a href="glib-Standard-Macros.html#NULL:CAPS">NULL</a></span><span class="symbol">);</span>
|
1363
|
-
<span class="normal"> </span><span class="function"><a href="glib-Perl-compatible-regular-expressions.html#g-regex-match-full">g_regex_match_full</a></span><span class="normal"> </span><span class="symbol">(</span><span class="normal">regex</span><span class="symbol">,</span><span class="normal"> string</span><span class="symbol">,</span><span class="normal"> </span><span class="symbol">-</span><span class="number">1</span><span class="symbol">,</span><span class="normal"> </span><span class="number">0</span><span class="symbol">,</span><span class="normal"> </span><span class="number">0</span><span class="symbol">,</span><span class="normal"> </span><span class="symbol">&</span><span class="normal">match_info</span><span class="symbol">,</span><span class="normal"> </span><span class="symbol">&</span><span class="normal">error</span><span class="symbol">);</span>
|
1364
|
-
<span class="normal"> </span><span class="keyword">while</span><span class="normal"> </span><span class="symbol">(</span><span class="function"><a href="glib-Perl-compatible-regular-expressions.html#g-match-info-matches">g_match_info_matches</a></span><span class="normal"> </span><span class="symbol">(</span><span class="normal">match_info</span><span class="symbol">))</span>
|
1365
|
-
<span class="normal"> </span><span class="cbracket">{</span>
|
1366
|
-
<span class="normal"> </span><span class="usertype">gchar</span><span class="normal"> </span><span class="symbol">*</span><span class="normal">word </span><span class="symbol">=</span><span class="normal"> </span><span class="function"><a href="glib-Perl-compatible-regular-expressions.html#g-match-info-fetch">g_match_info_fetch</a></span><span class="normal"> </span><span class="symbol">(</span><span class="normal">match_info</span><span class="symbol">,</span><span class="normal"> </span><span class="number">0</span><span class="symbol">);</span>
|
1367
|
-
<span class="normal"> </span><span class="function"><a href="glib-Warnings-and-Assertions.html#g-print">g_print</a></span><span class="normal"> </span><span class="symbol">(</span><span class="string">"Found: %s</span><span class="specialchar">\n</span><span class="string">"</span><span class="symbol">,</span><span class="normal"> word</span><span class="symbol">);</span>
|
1368
|
-
<span class="normal"> </span><span class="function"><a href="glib-Memory-Allocation.html#g-free">g_free</a></span><span class="normal"> </span><span class="symbol">(</span><span class="normal">word</span><span class="symbol">);</span>
|
1369
|
-
<span class="normal"> </span><span class="function"><a href="glib-Perl-compatible-regular-expressions.html#g-match-info-next">g_match_info_next</a></span><span class="normal"> </span><span class="symbol">(</span><span class="normal">match_info</span><span class="symbol">,</span><span class="normal"> </span><span class="symbol">&</span><span class="normal">error</span><span class="symbol">);</span>
|
1370
|
-
<span class="normal"> </span><span class="cbracket">}</span>
|
1371
|
-
<span class="normal"> </span><span class="function"><a href="glib-Perl-compatible-regular-expressions.html#g-match-info-free">g_match_info_free</a></span><span class="normal"> </span><span class="symbol">(</span><span class="normal">match_info</span><span class="symbol">);</span>
|
1372
|
-
<span class="normal"> </span><span class="function"><a href="glib-Perl-compatible-regular-expressions.html#g-regex-unref">g_regex_unref</a></span><span class="normal"> </span><span class="symbol">(</span><span class="normal">regex</span><span class="symbol">);</span>
|
1373
|
-
<span class="normal"> </span><span class="keyword">if</span><span class="normal"> </span><span class="symbol">(</span><span class="normal">error </span><span class="symbol">!=</span><span class="normal"> <a href="glib-Standard-Macros.html#NULL:CAPS">NULL</a></span><span class="symbol">)</span>
|
1374
|
-
<span class="normal"> </span><span class="cbracket">{</span>
|
1375
|
-
<span class="normal"> </span><span class="function"><a href="glib-Warnings-and-Assertions.html#g-printerr">g_printerr</a></span><span class="normal"> </span><span class="symbol">(</span><span class="string">"Error while matching: %s</span><span class="specialchar">\n</span><span class="string">"</span><span class="symbol">,</span><span class="normal"> error</span><span class="symbol">-></span><span class="normal">message</span><span class="symbol">);</span>
|
1376
|
-
<span class="normal"> </span><span class="function"><a href="glib-Error-Reporting.html#g-error-free">g_error_free</a></span><span class="normal"> </span><span class="symbol">(</span><span class="normal">error</span><span class="symbol">);</span>
|
1377
|
-
<span class="normal"> </span><span class="cbracket">}</span>
|
1378
|
-
<span class="cbracket">}</span></pre></td>
|
1379
|
-
</tr>
|
1380
|
-
</tbody>
|
1381
|
-
</table>
|
1382
|
-
</div>
|
1383
|
-
|
1384
|
-
<p>
|
1385
|
-
</p>
|
1386
|
-
<div class="variablelist"><table border="0">
|
1387
|
-
<col align="left" valign="top">
|
1388
|
-
<tbody>
|
1389
|
-
<tr>
|
1390
|
-
<td><p><span class="term"><em class="parameter"><code>regex</code></em> :</span></p></td>
|
1391
|
-
<td>a <a class="link" href="glib-Perl-compatible-regular-expressions.html#GRegex" title="GRegex"><span class="type">GRegex</span></a> structure from <a class="link" href="glib-Perl-compatible-regular-expressions.html#g-regex-new" title="g_regex_new ()"><code class="function">g_regex_new()</code></a>
|
1392
|
-
</td>
|
1393
|
-
</tr>
|
1394
|
-
<tr>
|
1395
|
-
<td><p><span class="term"><em class="parameter"><code>string</code></em> :</span></p></td>
|
1396
|
-
<td> the string to scan for matches. <span class="annotation">[<acronym title="Parameter points to an array of items."><span class="acronym">array</span></acronym> length=string_len]</span>
|
1397
|
-
</td>
|
1398
|
-
</tr>
|
1399
|
-
<tr>
|
1400
|
-
<td><p><span class="term"><em class="parameter"><code>string_len</code></em> :</span></p></td>
|
1401
|
-
<td>the length of <em class="parameter"><code>string</code></em>, or -1 if <em class="parameter"><code>string</code></em> is nul-terminated
|
1402
|
-
</td>
|
1403
|
-
</tr>
|
1404
|
-
<tr>
|
1405
|
-
<td><p><span class="term"><em class="parameter"><code>start_position</code></em> :</span></p></td>
|
1406
|
-
<td>starting index of the string to match
|
1407
|
-
</td>
|
1408
|
-
</tr>
|
1409
|
-
<tr>
|
1410
|
-
<td><p><span class="term"><em class="parameter"><code>match_options</code></em> :</span></p></td>
|
1411
|
-
<td>match options
|
1412
|
-
</td>
|
1413
|
-
</tr>
|
1414
|
-
<tr>
|
1415
|
-
<td><p><span class="term"><em class="parameter"><code>match_info</code></em> :</span></p></td>
|
1416
|
-
<td> pointer to location where to store
|
1417
|
-
the <a class="link" href="glib-Perl-compatible-regular-expressions.html#GMatchInfo" title="GMatchInfo"><span class="type">GMatchInfo</span></a>, or <a class="link" href="glib-Standard-Macros.html#NULL:CAPS" title="NULL"><code class="literal">NULL</code></a> if you do not need it. <span class="annotation">[<acronym title="Parameter for returning results. Default is transfer full."><span class="acronym">out</span></acronym>][<acronym title="NULL is ok, both for passing and for returning."><span class="acronym">allow-none</span></acronym>]</span>
|
1418
|
-
</td>
|
1419
|
-
</tr>
|
1420
|
-
<tr>
|
1421
|
-
<td><p><span class="term"><em class="parameter"><code>error</code></em> :</span></p></td>
|
1422
|
-
<td>location to store the error occuring, or <a class="link" href="glib-Standard-Macros.html#NULL:CAPS" title="NULL"><code class="literal">NULL</code></a> to ignore errors
|
1423
|
-
</td>
|
1424
|
-
</tr>
|
1425
|
-
<tr>
|
1426
|
-
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
|
1427
|
-
<td> <a class="link" href="glib-Standard-Macros.html#TRUE:CAPS" title="TRUE"><code class="literal">TRUE</code></a> is the string matched, <a class="link" href="glib-Standard-Macros.html#FALSE:CAPS" title="FALSE"><code class="literal">FALSE</code></a> otherwise
|
1428
|
-
|
1429
|
-
</td>
|
1430
|
-
</tr>
|
1431
|
-
</tbody>
|
1432
|
-
</table></div>
|
1433
|
-
<p class="since">Since 2.14</p>
|
1434
|
-
</div>
|
1435
|
-
<hr>
|
1436
|
-
<div class="refsect2">
|
1437
|
-
<a name="g-regex-match-all"></a><h3>g_regex_match_all ()</h3>
|
1438
|
-
<pre class="programlisting"><a class="link" href="glib-Basic-Types.html#gboolean" title="gboolean"><span class="returnvalue">gboolean</span></a> g_regex_match_all (<em class="parameter"><code>const <a class="link" href="glib-Perl-compatible-regular-expressions.html#GRegex" title="GRegex"><span class="type">GRegex</span></a> *regex</code></em>,
|
1439
|
-
<em class="parameter"><code>const <a class="link" href="glib-Basic-Types.html#gchar" title="gchar"><span class="type">gchar</span></a> *string</code></em>,
|
1440
|
-
<em class="parameter"><code><a class="link" href="glib-Perl-compatible-regular-expressions.html#GRegexMatchFlags" title="enum GRegexMatchFlags"><span class="type">GRegexMatchFlags</span></a> match_options</code></em>,
|
1441
|
-
<em class="parameter"><code><a class="link" href="glib-Perl-compatible-regular-expressions.html#GMatchInfo" title="GMatchInfo"><span class="type">GMatchInfo</span></a> **match_info</code></em>);</pre>
|
1442
|
-
<p>
|
1443
|
-
Using the standard algorithm for regular expression matching only
|
1444
|
-
the longest match in the string is retrieved. This function uses
|
1445
|
-
a different algorithm so it can retrieve all the possible matches.
|
1446
|
-
For more documentation see <a class="link" href="glib-Perl-compatible-regular-expressions.html#g-regex-match-all-full" title="g_regex_match_all_full ()"><code class="function">g_regex_match_all_full()</code></a>.
|
1447
|
-
</p>
|
1448
|
-
<p>
|
1449
|
-
A <a class="link" href="glib-Perl-compatible-regular-expressions.html#GMatchInfo" title="GMatchInfo"><span class="type">GMatchInfo</span></a> structure, used to get information on the match, is
|
1450
|
-
stored in <em class="parameter"><code>match_info</code></em> if not <a class="link" href="glib-Standard-Macros.html#NULL:CAPS" title="NULL"><code class="literal">NULL</code></a>. Note that if <em class="parameter"><code>match_info</code></em> is
|
1451
|
-
not <a class="link" href="glib-Standard-Macros.html#NULL:CAPS" title="NULL"><code class="literal">NULL</code></a> then it is created even if the function returns <a class="link" href="glib-Standard-Macros.html#FALSE:CAPS" title="FALSE"><code class="literal">FALSE</code></a>,
|
1452
|
-
i.e. you must free it regardless if regular expression actually
|
1453
|
-
matched.
|
1454
|
-
</p>
|
1455
|
-
<p>
|
1456
|
-
<em class="parameter"><code>string</code></em> is not copied and is used in <a class="link" href="glib-Perl-compatible-regular-expressions.html#GMatchInfo" title="GMatchInfo"><span class="type">GMatchInfo</span></a> internally. If
|
1457
|
-
you use any <a class="link" href="glib-Perl-compatible-regular-expressions.html#GMatchInfo" title="GMatchInfo"><span class="type">GMatchInfo</span></a> method (except <a class="link" href="glib-Perl-compatible-regular-expressions.html#g-match-info-free" title="g_match_info_free ()"><code class="function">g_match_info_free()</code></a>) after
|
1458
|
-
freeing or modifying <em class="parameter"><code>string</code></em> then the behaviour is undefined.
|
1459
|
-
</p>
|
1460
|
-
<div class="variablelist"><table border="0">
|
1461
|
-
<col align="left" valign="top">
|
1462
|
-
<tbody>
|
1463
|
-
<tr>
|
1464
|
-
<td><p><span class="term"><em class="parameter"><code>regex</code></em> :</span></p></td>
|
1465
|
-
<td>a <a class="link" href="glib-Perl-compatible-regular-expressions.html#GRegex" title="GRegex"><span class="type">GRegex</span></a> structure from <a class="link" href="glib-Perl-compatible-regular-expressions.html#g-regex-new" title="g_regex_new ()"><code class="function">g_regex_new()</code></a>
|
1466
|
-
</td>
|
1467
|
-
</tr>
|
1468
|
-
<tr>
|
1469
|
-
<td><p><span class="term"><em class="parameter"><code>string</code></em> :</span></p></td>
|
1470
|
-
<td>the string to scan for matches
|
1471
|
-
</td>
|
1472
|
-
</tr>
|
1473
|
-
<tr>
|
1474
|
-
<td><p><span class="term"><em class="parameter"><code>match_options</code></em> :</span></p></td>
|
1475
|
-
<td>match options
|
1476
|
-
</td>
|
1477
|
-
</tr>
|
1478
|
-
<tr>
|
1479
|
-
<td><p><span class="term"><em class="parameter"><code>match_info</code></em> :</span></p></td>
|
1480
|
-
<td> pointer to location where to store
|
1481
|
-
the <a class="link" href="glib-Perl-compatible-regular-expressions.html#GMatchInfo" title="GMatchInfo"><span class="type">GMatchInfo</span></a>, or <a class="link" href="glib-Standard-Macros.html#NULL:CAPS" title="NULL"><code class="literal">NULL</code></a> if you do not need it. <span class="annotation">[<acronym title="Parameter for returning results. Default is transfer full."><span class="acronym">out</span></acronym>][<acronym title="NULL is ok, both for passing and for returning."><span class="acronym">allow-none</span></acronym>]</span>
|
1482
|
-
</td>
|
1483
|
-
</tr>
|
1484
|
-
<tr>
|
1485
|
-
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
|
1486
|
-
<td> <a class="link" href="glib-Standard-Macros.html#TRUE:CAPS" title="TRUE"><code class="literal">TRUE</code></a> is the string matched, <a class="link" href="glib-Standard-Macros.html#FALSE:CAPS" title="FALSE"><code class="literal">FALSE</code></a> otherwise
|
1487
|
-
|
1488
|
-
</td>
|
1489
|
-
</tr>
|
1490
|
-
</tbody>
|
1491
|
-
</table></div>
|
1492
|
-
<p class="since">Since 2.14</p>
|
1493
|
-
</div>
|
1494
|
-
<hr>
|
1495
|
-
<div class="refsect2">
|
1496
|
-
<a name="g-regex-match-all-full"></a><h3>g_regex_match_all_full ()</h3>
|
1497
|
-
<pre class="programlisting"><a class="link" href="glib-Basic-Types.html#gboolean" title="gboolean"><span class="returnvalue">gboolean</span></a> g_regex_match_all_full (<em class="parameter"><code>const <a class="link" href="glib-Perl-compatible-regular-expressions.html#GRegex" title="GRegex"><span class="type">GRegex</span></a> *regex</code></em>,
|
1498
|
-
<em class="parameter"><code>const <a class="link" href="glib-Basic-Types.html#gchar" title="gchar"><span class="type">gchar</span></a> *string</code></em>,
|
1499
|
-
<em class="parameter"><code><a class="link" href="glib-Basic-Types.html#gssize" title="gssize"><span class="type">gssize</span></a> string_len</code></em>,
|
1500
|
-
<em class="parameter"><code><a class="link" href="glib-Basic-Types.html#gint" title="gint"><span class="type">gint</span></a> start_position</code></em>,
|
1501
|
-
<em class="parameter"><code><a class="link" href="glib-Perl-compatible-regular-expressions.html#GRegexMatchFlags" title="enum GRegexMatchFlags"><span class="type">GRegexMatchFlags</span></a> match_options</code></em>,
|
1502
|
-
<em class="parameter"><code><a class="link" href="glib-Perl-compatible-regular-expressions.html#GMatchInfo" title="GMatchInfo"><span class="type">GMatchInfo</span></a> **match_info</code></em>,
|
1503
|
-
<em class="parameter"><code><a class="link" href="glib-Error-Reporting.html#GError" title="GError"><span class="type">GError</span></a> **error</code></em>);</pre>
|
1504
|
-
<p>
|
1505
|
-
Using the standard algorithm for regular expression matching only
|
1506
|
-
the longest match in the string is retrieved, it is not possibile
|
1507
|
-
to obtain all the available matches. For instance matching
|
1508
|
-
"<a> <b> <c>" against the pattern "<.*>"
|
1509
|
-
you get "<a> <b> <c>".
|
1510
|
-
</p>
|
1511
|
-
<p>
|
1512
|
-
This function uses a different algorithm (called DFA, i.e. deterministic
|
1513
|
-
finite automaton), so it can retrieve all the possible matches, all
|
1514
|
-
starting at the same point in the string. For instance matching
|
1515
|
-
"<a> <b> <c>" against the pattern "<.*>"
|
1516
|
-
you would obtain three matches: "<a> <b> <c>",
|
1517
|
-
"<a> <b>" and "<a>".
|
1518
|
-
</p>
|
1519
|
-
<p>
|
1520
|
-
The number of matched strings is retrieved using
|
1521
|
-
<a class="link" href="glib-Perl-compatible-regular-expressions.html#g-match-info-get-match-count" title="g_match_info_get_match_count ()"><code class="function">g_match_info_get_match_count()</code></a>. To obtain the matched strings and
|
1522
|
-
their position you can use, respectively, <a class="link" href="glib-Perl-compatible-regular-expressions.html#g-match-info-fetch" title="g_match_info_fetch ()"><code class="function">g_match_info_fetch()</code></a> and
|
1523
|
-
<a class="link" href="glib-Perl-compatible-regular-expressions.html#g-match-info-fetch-pos" title="g_match_info_fetch_pos ()"><code class="function">g_match_info_fetch_pos()</code></a>. Note that the strings are returned in
|
1524
|
-
reverse order of length; that is, the longest matching string is
|
1525
|
-
given first.
|
1526
|
-
</p>
|
1527
|
-
<p>
|
1528
|
-
Note that the DFA algorithm is slower than the standard one and it
|
1529
|
-
is not able to capture substrings, so backreferences do not work.
|
1530
|
-
</p>
|
1531
|
-
<p>
|
1532
|
-
Setting <em class="parameter"><code>start_position</code></em> differs from just passing over a shortened
|
1533
|
-
string and setting <a class="link" href="glib-Perl-compatible-regular-expressions.html#G-REGEX-MATCH-NOTBOL:CAPS"><span class="type">G_REGEX_MATCH_NOTBOL</span></a> in the case of a pattern
|
1534
|
-
that begins with any kind of lookbehind assertion, such as "\b".
|
1535
|
-
</p>
|
1536
|
-
<p>
|
1537
|
-
A <a class="link" href="glib-Perl-compatible-regular-expressions.html#GMatchInfo" title="GMatchInfo"><span class="type">GMatchInfo</span></a> structure, used to get information on the match, is
|
1538
|
-
stored in <em class="parameter"><code>match_info</code></em> if not <a class="link" href="glib-Standard-Macros.html#NULL:CAPS" title="NULL"><code class="literal">NULL</code></a>. Note that if <em class="parameter"><code>match_info</code></em> is
|
1539
|
-
not <a class="link" href="glib-Standard-Macros.html#NULL:CAPS" title="NULL"><code class="literal">NULL</code></a> then it is created even if the function returns <a class="link" href="glib-Standard-Macros.html#FALSE:CAPS" title="FALSE"><code class="literal">FALSE</code></a>,
|
1540
|
-
i.e. you must free it regardless if regular expression actually
|
1541
|
-
matched.
|
1542
|
-
</p>
|
1543
|
-
<p>
|
1544
|
-
<em class="parameter"><code>string</code></em> is not copied and is used in <a class="link" href="glib-Perl-compatible-regular-expressions.html#GMatchInfo" title="GMatchInfo"><span class="type">GMatchInfo</span></a> internally. If
|
1545
|
-
you use any <a class="link" href="glib-Perl-compatible-regular-expressions.html#GMatchInfo" title="GMatchInfo"><span class="type">GMatchInfo</span></a> method (except <a class="link" href="glib-Perl-compatible-regular-expressions.html#g-match-info-free" title="g_match_info_free ()"><code class="function">g_match_info_free()</code></a>) after
|
1546
|
-
freeing or modifying <em class="parameter"><code>string</code></em> then the behaviour is undefined.
|
1547
|
-
</p>
|
1548
|
-
<div class="variablelist"><table border="0">
|
1549
|
-
<col align="left" valign="top">
|
1550
|
-
<tbody>
|
1551
|
-
<tr>
|
1552
|
-
<td><p><span class="term"><em class="parameter"><code>regex</code></em> :</span></p></td>
|
1553
|
-
<td>a <a class="link" href="glib-Perl-compatible-regular-expressions.html#GRegex" title="GRegex"><span class="type">GRegex</span></a> structure from <a class="link" href="glib-Perl-compatible-regular-expressions.html#g-regex-new" title="g_regex_new ()"><code class="function">g_regex_new()</code></a>
|
1554
|
-
</td>
|
1555
|
-
</tr>
|
1556
|
-
<tr>
|
1557
|
-
<td><p><span class="term"><em class="parameter"><code>string</code></em> :</span></p></td>
|
1558
|
-
<td> the string to scan for matches. <span class="annotation">[<acronym title="Parameter points to an array of items."><span class="acronym">array</span></acronym> length=string_len]</span>
|
1559
|
-
</td>
|
1560
|
-
</tr>
|
1561
|
-
<tr>
|
1562
|
-
<td><p><span class="term"><em class="parameter"><code>string_len</code></em> :</span></p></td>
|
1563
|
-
<td>the length of <em class="parameter"><code>string</code></em>, or -1 if <em class="parameter"><code>string</code></em> is nul-terminated
|
1564
|
-
</td>
|
1565
|
-
</tr>
|
1566
|
-
<tr>
|
1567
|
-
<td><p><span class="term"><em class="parameter"><code>start_position</code></em> :</span></p></td>
|
1568
|
-
<td>starting index of the string to match
|
1569
|
-
</td>
|
1570
|
-
</tr>
|
1571
|
-
<tr>
|
1572
|
-
<td><p><span class="term"><em class="parameter"><code>match_options</code></em> :</span></p></td>
|
1573
|
-
<td>match options
|
1574
|
-
</td>
|
1575
|
-
</tr>
|
1576
|
-
<tr>
|
1577
|
-
<td><p><span class="term"><em class="parameter"><code>match_info</code></em> :</span></p></td>
|
1578
|
-
<td> pointer to location where to store
|
1579
|
-
the <a class="link" href="glib-Perl-compatible-regular-expressions.html#GMatchInfo" title="GMatchInfo"><span class="type">GMatchInfo</span></a>, or <a class="link" href="glib-Standard-Macros.html#NULL:CAPS" title="NULL"><code class="literal">NULL</code></a> if you do not need it. <span class="annotation">[<acronym title="Parameter for returning results. Default is transfer full."><span class="acronym">out</span></acronym>][<acronym title="NULL is ok, both for passing and for returning."><span class="acronym">allow-none</span></acronym>]</span>
|
1580
|
-
</td>
|
1581
|
-
</tr>
|
1582
|
-
<tr>
|
1583
|
-
<td><p><span class="term"><em class="parameter"><code>error</code></em> :</span></p></td>
|
1584
|
-
<td>location to store the error occuring, or <a class="link" href="glib-Standard-Macros.html#NULL:CAPS" title="NULL"><code class="literal">NULL</code></a> to ignore errors
|
1585
|
-
</td>
|
1586
|
-
</tr>
|
1587
|
-
<tr>
|
1588
|
-
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
|
1589
|
-
<td> <a class="link" href="glib-Standard-Macros.html#TRUE:CAPS" title="TRUE"><code class="literal">TRUE</code></a> is the string matched, <a class="link" href="glib-Standard-Macros.html#FALSE:CAPS" title="FALSE"><code class="literal">FALSE</code></a> otherwise
|
1590
|
-
|
1591
|
-
</td>
|
1592
|
-
</tr>
|
1593
|
-
</tbody>
|
1594
|
-
</table></div>
|
1595
|
-
<p class="since">Since 2.14</p>
|
1596
|
-
</div>
|
1597
|
-
<hr>
|
1598
|
-
<div class="refsect2">
|
1599
|
-
<a name="g-regex-split-simple"></a><h3>g_regex_split_simple ()</h3>
|
1600
|
-
<pre class="programlisting"><a class="link" href="glib-Basic-Types.html#gchar" title="gchar"><span class="returnvalue">gchar</span></a> ** g_regex_split_simple (<em class="parameter"><code>const <a class="link" href="glib-Basic-Types.html#gchar" title="gchar"><span class="type">gchar</span></a> *pattern</code></em>,
|
1601
|
-
<em class="parameter"><code>const <a class="link" href="glib-Basic-Types.html#gchar" title="gchar"><span class="type">gchar</span></a> *string</code></em>,
|
1602
|
-
<em class="parameter"><code><a class="link" href="glib-Perl-compatible-regular-expressions.html#GRegexCompileFlags" title="enum GRegexCompileFlags"><span class="type">GRegexCompileFlags</span></a> compile_options</code></em>,
|
1603
|
-
<em class="parameter"><code><a class="link" href="glib-Perl-compatible-regular-expressions.html#GRegexMatchFlags" title="enum GRegexMatchFlags"><span class="type">GRegexMatchFlags</span></a> match_options</code></em>);</pre>
|
1604
|
-
<p>
|
1605
|
-
Breaks the string on the pattern, and returns an array of
|
1606
|
-
the tokens. If the pattern contains capturing parentheses,
|
1607
|
-
then the text for each of the substrings will also be returned.
|
1608
|
-
If the pattern does not match anywhere in the string, then the
|
1609
|
-
whole string is returned as the first token.
|
1610
|
-
</p>
|
1611
|
-
<p>
|
1612
|
-
This function is equivalent to <a class="link" href="glib-Perl-compatible-regular-expressions.html#g-regex-split" title="g_regex_split ()"><code class="function">g_regex_split()</code></a> but it does
|
1613
|
-
not require to compile the pattern with <a class="link" href="glib-Perl-compatible-regular-expressions.html#g-regex-new" title="g_regex_new ()"><code class="function">g_regex_new()</code></a>, avoiding
|
1614
|
-
some lines of code when you need just to do a split without
|
1615
|
-
extracting substrings, capture counts, and so on.
|
1616
|
-
</p>
|
1617
|
-
<p>
|
1618
|
-
If this function is to be called on the same <em class="parameter"><code>pattern</code></em> more than
|
1619
|
-
once, it's more efficient to compile the pattern once with
|
1620
|
-
<a class="link" href="glib-Perl-compatible-regular-expressions.html#g-regex-new" title="g_regex_new ()"><code class="function">g_regex_new()</code></a> and then use <a class="link" href="glib-Perl-compatible-regular-expressions.html#g-regex-split" title="g_regex_split ()"><code class="function">g_regex_split()</code></a>.
|
1621
|
-
</p>
|
1622
|
-
<p>
|
1623
|
-
As a special case, the result of splitting the empty string ""
|
1624
|
-
is an empty vector, not a vector containing a single string.
|
1625
|
-
The reason for this special case is that being able to represent
|
1626
|
-
a empty vector is typically more useful than consistent handling
|
1627
|
-
of empty elements. If you do need to represent empty elements,
|
1628
|
-
you'll need to check for the empty string before calling this
|
1629
|
-
function.
|
1630
|
-
</p>
|
1631
|
-
<p>
|
1632
|
-
A pattern that can match empty strings splits <em class="parameter"><code>string</code></em> into
|
1633
|
-
separate characters wherever it matches the empty string between
|
1634
|
-
characters. For example splitting "ab c" using as a separator
|
1635
|
-
"\s*", you will get "a", "b" and "c".
|
1636
|
-
</p>
|
1637
|
-
<div class="variablelist"><table border="0">
|
1638
|
-
<col align="left" valign="top">
|
1639
|
-
<tbody>
|
1640
|
-
<tr>
|
1641
|
-
<td><p><span class="term"><em class="parameter"><code>pattern</code></em> :</span></p></td>
|
1642
|
-
<td>the regular expression
|
1643
|
-
</td>
|
1644
|
-
</tr>
|
1645
|
-
<tr>
|
1646
|
-
<td><p><span class="term"><em class="parameter"><code>string</code></em> :</span></p></td>
|
1647
|
-
<td>the string to scan for matches
|
1648
|
-
</td>
|
1649
|
-
</tr>
|
1650
|
-
<tr>
|
1651
|
-
<td><p><span class="term"><em class="parameter"><code>compile_options</code></em> :</span></p></td>
|
1652
|
-
<td>compile options for the regular expression, or 0
|
1653
|
-
</td>
|
1654
|
-
</tr>
|
1655
|
-
<tr>
|
1656
|
-
<td><p><span class="term"><em class="parameter"><code>match_options</code></em> :</span></p></td>
|
1657
|
-
<td>match options, or 0
|
1658
|
-
</td>
|
1659
|
-
</tr>
|
1660
|
-
<tr>
|
1661
|
-
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
|
1662
|
-
<td> a <a class="link" href="glib-Standard-Macros.html#NULL:CAPS" title="NULL"><code class="literal">NULL</code></a>-terminated array of strings. Free it using <a class="link" href="glib-String-Utility-Functions.html#g-strfreev" title="g_strfreev ()"><code class="function">g_strfreev()</code></a>
|
1663
|
-
|
1664
|
-
</td>
|
1665
|
-
</tr>
|
1666
|
-
</tbody>
|
1667
|
-
</table></div>
|
1668
|
-
<p class="since">Since 2.14</p>
|
1669
|
-
</div>
|
1670
|
-
<hr>
|
1671
|
-
<div class="refsect2">
|
1672
|
-
<a name="g-regex-split"></a><h3>g_regex_split ()</h3>
|
1673
|
-
<pre class="programlisting"><a class="link" href="glib-Basic-Types.html#gchar" title="gchar"><span class="returnvalue">gchar</span></a> ** g_regex_split (<em class="parameter"><code>const <a class="link" href="glib-Perl-compatible-regular-expressions.html#GRegex" title="GRegex"><span class="type">GRegex</span></a> *regex</code></em>,
|
1674
|
-
<em class="parameter"><code>const <a class="link" href="glib-Basic-Types.html#gchar" title="gchar"><span class="type">gchar</span></a> *string</code></em>,
|
1675
|
-
<em class="parameter"><code><a class="link" href="glib-Perl-compatible-regular-expressions.html#GRegexMatchFlags" title="enum GRegexMatchFlags"><span class="type">GRegexMatchFlags</span></a> match_options</code></em>);</pre>
|
1676
|
-
<p>
|
1677
|
-
Breaks the string on the pattern, and returns an array of the tokens.
|
1678
|
-
If the pattern contains capturing parentheses, then the text for each
|
1679
|
-
of the substrings will also be returned. If the pattern does not match
|
1680
|
-
anywhere in the string, then the whole string is returned as the first
|
1681
|
-
token.
|
1682
|
-
</p>
|
1683
|
-
<p>
|
1684
|
-
As a special case, the result of splitting the empty string "" is an
|
1685
|
-
empty vector, not a vector containing a single string. The reason for
|
1686
|
-
this special case is that being able to represent a empty vector is
|
1687
|
-
typically more useful than consistent handling of empty elements. If
|
1688
|
-
you do need to represent empty elements, you'll need to check for the
|
1689
|
-
empty string before calling this function.
|
1690
|
-
</p>
|
1691
|
-
<p>
|
1692
|
-
A pattern that can match empty strings splits <em class="parameter"><code>string</code></em> into separate
|
1693
|
-
characters wherever it matches the empty string between characters.
|
1694
|
-
For example splitting "ab c" using as a separator "\s*", you will get
|
1695
|
-
"a", "b" and "c".
|
1696
|
-
</p>
|
1697
|
-
<div class="variablelist"><table border="0">
|
1698
|
-
<col align="left" valign="top">
|
1699
|
-
<tbody>
|
1700
|
-
<tr>
|
1701
|
-
<td><p><span class="term"><em class="parameter"><code>regex</code></em> :</span></p></td>
|
1702
|
-
<td>a <a class="link" href="glib-Perl-compatible-regular-expressions.html#GRegex" title="GRegex"><span class="type">GRegex</span></a> structure
|
1703
|
-
</td>
|
1704
|
-
</tr>
|
1705
|
-
<tr>
|
1706
|
-
<td><p><span class="term"><em class="parameter"><code>string</code></em> :</span></p></td>
|
1707
|
-
<td>the string to split with the pattern
|
1708
|
-
</td>
|
1709
|
-
</tr>
|
1710
|
-
<tr>
|
1711
|
-
<td><p><span class="term"><em class="parameter"><code>match_options</code></em> :</span></p></td>
|
1712
|
-
<td>match time option flags
|
1713
|
-
</td>
|
1714
|
-
</tr>
|
1715
|
-
<tr>
|
1716
|
-
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
|
1717
|
-
<td> a <a class="link" href="glib-Standard-Macros.html#NULL:CAPS" title="NULL"><code class="literal">NULL</code></a>-terminated gchar ** array. Free it using <a class="link" href="glib-String-Utility-Functions.html#g-strfreev" title="g_strfreev ()"><code class="function">g_strfreev()</code></a>
|
1718
|
-
|
1719
|
-
</td>
|
1720
|
-
</tr>
|
1721
|
-
</tbody>
|
1722
|
-
</table></div>
|
1723
|
-
<p class="since">Since 2.14</p>
|
1724
|
-
</div>
|
1725
|
-
<hr>
|
1726
|
-
<div class="refsect2">
|
1727
|
-
<a name="g-regex-split-full"></a><h3>g_regex_split_full ()</h3>
|
1728
|
-
<pre class="programlisting"><a class="link" href="glib-Basic-Types.html#gchar" title="gchar"><span class="returnvalue">gchar</span></a> ** g_regex_split_full (<em class="parameter"><code>const <a class="link" href="glib-Perl-compatible-regular-expressions.html#GRegex" title="GRegex"><span class="type">GRegex</span></a> *regex</code></em>,
|
1729
|
-
<em class="parameter"><code>const <a class="link" href="glib-Basic-Types.html#gchar" title="gchar"><span class="type">gchar</span></a> *string</code></em>,
|
1730
|
-
<em class="parameter"><code><a class="link" href="glib-Basic-Types.html#gssize" title="gssize"><span class="type">gssize</span></a> string_len</code></em>,
|
1731
|
-
<em class="parameter"><code><a class="link" href="glib-Basic-Types.html#gint" title="gint"><span class="type">gint</span></a> start_position</code></em>,
|
1732
|
-
<em class="parameter"><code><a class="link" href="glib-Perl-compatible-regular-expressions.html#GRegexMatchFlags" title="enum GRegexMatchFlags"><span class="type">GRegexMatchFlags</span></a> match_options</code></em>,
|
1733
|
-
<em class="parameter"><code><a class="link" href="glib-Basic-Types.html#gint" title="gint"><span class="type">gint</span></a> max_tokens</code></em>,
|
1734
|
-
<em class="parameter"><code><a class="link" href="glib-Error-Reporting.html#GError" title="GError"><span class="type">GError</span></a> **error</code></em>);</pre>
|
1735
|
-
<p>
|
1736
|
-
Breaks the string on the pattern, and returns an array of the tokens.
|
1737
|
-
If the pattern contains capturing parentheses, then the text for each
|
1738
|
-
of the substrings will also be returned. If the pattern does not match
|
1739
|
-
anywhere in the string, then the whole string is returned as the first
|
1740
|
-
token.
|
1741
|
-
</p>
|
1742
|
-
<p>
|
1743
|
-
As a special case, the result of splitting the empty string "" is an
|
1744
|
-
empty vector, not a vector containing a single string. The reason for
|
1745
|
-
this special case is that being able to represent a empty vector is
|
1746
|
-
typically more useful than consistent handling of empty elements. If
|
1747
|
-
you do need to represent empty elements, you'll need to check for the
|
1748
|
-
empty string before calling this function.
|
1749
|
-
</p>
|
1750
|
-
<p>
|
1751
|
-
A pattern that can match empty strings splits <em class="parameter"><code>string</code></em> into separate
|
1752
|
-
characters wherever it matches the empty string between characters.
|
1753
|
-
For example splitting "ab c" using as a separator "\s*", you will get
|
1754
|
-
"a", "b" and "c".
|
1755
|
-
</p>
|
1756
|
-
<p>
|
1757
|
-
Setting <em class="parameter"><code>start_position</code></em> differs from just passing over a shortened
|
1758
|
-
string and setting <a class="link" href="glib-Perl-compatible-regular-expressions.html#G-REGEX-MATCH-NOTBOL:CAPS"><span class="type">G_REGEX_MATCH_NOTBOL</span></a> in the case of a pattern
|
1759
|
-
that begins with any kind of lookbehind assertion, such as "\b".
|
1760
|
-
</p>
|
1761
|
-
<div class="variablelist"><table border="0">
|
1762
|
-
<col align="left" valign="top">
|
1763
|
-
<tbody>
|
1764
|
-
<tr>
|
1765
|
-
<td><p><span class="term"><em class="parameter"><code>regex</code></em> :</span></p></td>
|
1766
|
-
<td>a <a class="link" href="glib-Perl-compatible-regular-expressions.html#GRegex" title="GRegex"><span class="type">GRegex</span></a> structure
|
1767
|
-
</td>
|
1768
|
-
</tr>
|
1769
|
-
<tr>
|
1770
|
-
<td><p><span class="term"><em class="parameter"><code>string</code></em> :</span></p></td>
|
1771
|
-
<td> the string to split with the pattern. <span class="annotation">[<acronym title="Parameter points to an array of items."><span class="acronym">array</span></acronym> length=string_len]</span>
|
1772
|
-
</td>
|
1773
|
-
</tr>
|
1774
|
-
<tr>
|
1775
|
-
<td><p><span class="term"><em class="parameter"><code>string_len</code></em> :</span></p></td>
|
1776
|
-
<td>the length of <em class="parameter"><code>string</code></em>, or -1 if <em class="parameter"><code>string</code></em> is nul-terminated
|
1777
|
-
</td>
|
1778
|
-
</tr>
|
1779
|
-
<tr>
|
1780
|
-
<td><p><span class="term"><em class="parameter"><code>start_position</code></em> :</span></p></td>
|
1781
|
-
<td>starting index of the string to match
|
1782
|
-
</td>
|
1783
|
-
</tr>
|
1784
|
-
<tr>
|
1785
|
-
<td><p><span class="term"><em class="parameter"><code>match_options</code></em> :</span></p></td>
|
1786
|
-
<td>match time option flags
|
1787
|
-
</td>
|
1788
|
-
</tr>
|
1789
|
-
<tr>
|
1790
|
-
<td><p><span class="term"><em class="parameter"><code>max_tokens</code></em> :</span></p></td>
|
1791
|
-
<td>the maximum number of tokens to split <em class="parameter"><code>string</code></em> into.
|
1792
|
-
If this is less than 1, the string is split completely
|
1793
|
-
</td>
|
1794
|
-
</tr>
|
1795
|
-
<tr>
|
1796
|
-
<td><p><span class="term"><em class="parameter"><code>error</code></em> :</span></p></td>
|
1797
|
-
<td>return location for a <a class="link" href="glib-Error-Reporting.html#GError" title="GError"><span class="type">GError</span></a>
|
1798
|
-
</td>
|
1799
|
-
</tr>
|
1800
|
-
<tr>
|
1801
|
-
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
|
1802
|
-
<td> a <a class="link" href="glib-Standard-Macros.html#NULL:CAPS" title="NULL"><code class="literal">NULL</code></a>-terminated gchar ** array. Free it using <a class="link" href="glib-String-Utility-Functions.html#g-strfreev" title="g_strfreev ()"><code class="function">g_strfreev()</code></a>
|
1803
|
-
|
1804
|
-
</td>
|
1805
|
-
</tr>
|
1806
|
-
</tbody>
|
1807
|
-
</table></div>
|
1808
|
-
<p class="since">Since 2.14</p>
|
1809
|
-
</div>
|
1810
|
-
<hr>
|
1811
|
-
<div class="refsect2">
|
1812
|
-
<a name="g-regex-replace"></a><h3>g_regex_replace ()</h3>
|
1813
|
-
<pre class="programlisting"><a class="link" href="glib-Basic-Types.html#gchar" title="gchar"><span class="returnvalue">gchar</span></a> * g_regex_replace (<em class="parameter"><code>const <a class="link" href="glib-Perl-compatible-regular-expressions.html#GRegex" title="GRegex"><span class="type">GRegex</span></a> *regex</code></em>,
|
1814
|
-
<em class="parameter"><code>const <a class="link" href="glib-Basic-Types.html#gchar" title="gchar"><span class="type">gchar</span></a> *string</code></em>,
|
1815
|
-
<em class="parameter"><code><a class="link" href="glib-Basic-Types.html#gssize" title="gssize"><span class="type">gssize</span></a> string_len</code></em>,
|
1816
|
-
<em class="parameter"><code><a class="link" href="glib-Basic-Types.html#gint" title="gint"><span class="type">gint</span></a> start_position</code></em>,
|
1817
|
-
<em class="parameter"><code>const <a class="link" href="glib-Basic-Types.html#gchar" title="gchar"><span class="type">gchar</span></a> *replacement</code></em>,
|
1818
|
-
<em class="parameter"><code><a class="link" href="glib-Perl-compatible-regular-expressions.html#GRegexMatchFlags" title="enum GRegexMatchFlags"><span class="type">GRegexMatchFlags</span></a> match_options</code></em>,
|
1819
|
-
<em class="parameter"><code><a class="link" href="glib-Error-Reporting.html#GError" title="GError"><span class="type">GError</span></a> **error</code></em>);</pre>
|
1820
|
-
<p>
|
1821
|
-
Replaces all occurrences of the pattern in <em class="parameter"><code>regex</code></em> with the
|
1822
|
-
replacement text. Backreferences of the form '\number' or
|
1823
|
-
'\g<number>' in the replacement text are interpolated by the
|
1824
|
-
number-th captured subexpression of the match, '\g<name>' refers
|
1825
|
-
to the captured subexpression with the given name. '\0' refers to the
|
1826
|
-
complete match, but '\0' followed by a number is the octal representation
|
1827
|
-
of a character. To include a literal '\' in the replacement, write '\\'.
|
1828
|
-
There are also escapes that changes the case of the following text:
|
1829
|
-
</p>
|
1830
|
-
<p>
|
1831
|
-
</p>
|
1832
|
-
<div class="variablelist"><table border="0">
|
1833
|
-
<col align="left" valign="top">
|
1834
|
-
<tbody>
|
1835
|
-
<tr>
|
1836
|
-
<td><p><span class="term">\l</span></p></td>
|
1837
|
-
<td><p>Convert to lower case the next character</p></td>
|
1838
|
-
</tr>
|
1839
|
-
<tr>
|
1840
|
-
<td><p><span class="term">\u</span></p></td>
|
1841
|
-
<td><p>Convert to upper case the next character</p></td>
|
1842
|
-
</tr>
|
1843
|
-
<tr>
|
1844
|
-
<td><p><span class="term">\L</span></p></td>
|
1845
|
-
<td><p>Convert to lower case till \E</p></td>
|
1846
|
-
</tr>
|
1847
|
-
<tr>
|
1848
|
-
<td><p><span class="term">\U</span></p></td>
|
1849
|
-
<td><p>Convert to upper case till \E</p></td>
|
1850
|
-
</tr>
|
1851
|
-
<tr>
|
1852
|
-
<td><p><span class="term">\E</span></p></td>
|
1853
|
-
<td><p>End case modification</p></td>
|
1854
|
-
</tr>
|
1855
|
-
</tbody>
|
1856
|
-
</table></div>
|
1857
|
-
<p>
|
1858
|
-
</p>
|
1859
|
-
<p>
|
1860
|
-
If you do not need to use backreferences use <a class="link" href="glib-Perl-compatible-regular-expressions.html#g-regex-replace-literal" title="g_regex_replace_literal ()"><code class="function">g_regex_replace_literal()</code></a>.
|
1861
|
-
</p>
|
1862
|
-
<p>
|
1863
|
-
The <em class="parameter"><code>replacement</code></em> string must be UTF-8 encoded even if <a class="link" href="glib-Perl-compatible-regular-expressions.html#G-REGEX-RAW:CAPS"><span class="type">G_REGEX_RAW</span></a> was
|
1864
|
-
passed to <a class="link" href="glib-Perl-compatible-regular-expressions.html#g-regex-new" title="g_regex_new ()"><code class="function">g_regex_new()</code></a>. If you want to use not UTF-8 encoded stings
|
1865
|
-
you can use <a class="link" href="glib-Perl-compatible-regular-expressions.html#g-regex-replace-literal" title="g_regex_replace_literal ()"><code class="function">g_regex_replace_literal()</code></a>.
|
1866
|
-
</p>
|
1867
|
-
<p>
|
1868
|
-
Setting <em class="parameter"><code>start_position</code></em> differs from just passing over a shortened
|
1869
|
-
string and setting <a class="link" href="glib-Perl-compatible-regular-expressions.html#G-REGEX-MATCH-NOTBOL:CAPS"><span class="type">G_REGEX_MATCH_NOTBOL</span></a> in the case of a pattern that
|
1870
|
-
begins with any kind of lookbehind assertion, such as "\b".
|
1871
|
-
</p>
|
1872
|
-
<div class="variablelist"><table border="0">
|
1873
|
-
<col align="left" valign="top">
|
1874
|
-
<tbody>
|
1875
|
-
<tr>
|
1876
|
-
<td><p><span class="term"><em class="parameter"><code>regex</code></em> :</span></p></td>
|
1877
|
-
<td>a <a class="link" href="glib-Perl-compatible-regular-expressions.html#GRegex" title="GRegex"><span class="type">GRegex</span></a> structure
|
1878
|
-
</td>
|
1879
|
-
</tr>
|
1880
|
-
<tr>
|
1881
|
-
<td><p><span class="term"><em class="parameter"><code>string</code></em> :</span></p></td>
|
1882
|
-
<td> the string to perform matches against. <span class="annotation">[<acronym title="Parameter points to an array of items."><span class="acronym">array</span></acronym> length=string_len]</span>
|
1883
|
-
</td>
|
1884
|
-
</tr>
|
1885
|
-
<tr>
|
1886
|
-
<td><p><span class="term"><em class="parameter"><code>string_len</code></em> :</span></p></td>
|
1887
|
-
<td>the length of <em class="parameter"><code>string</code></em>, or -1 if <em class="parameter"><code>string</code></em> is nul-terminated
|
1888
|
-
</td>
|
1889
|
-
</tr>
|
1890
|
-
<tr>
|
1891
|
-
<td><p><span class="term"><em class="parameter"><code>start_position</code></em> :</span></p></td>
|
1892
|
-
<td>starting index of the string to match
|
1893
|
-
</td>
|
1894
|
-
</tr>
|
1895
|
-
<tr>
|
1896
|
-
<td><p><span class="term"><em class="parameter"><code>replacement</code></em> :</span></p></td>
|
1897
|
-
<td>text to replace each match with
|
1898
|
-
</td>
|
1899
|
-
</tr>
|
1900
|
-
<tr>
|
1901
|
-
<td><p><span class="term"><em class="parameter"><code>match_options</code></em> :</span></p></td>
|
1902
|
-
<td>options for the match
|
1903
|
-
</td>
|
1904
|
-
</tr>
|
1905
|
-
<tr>
|
1906
|
-
<td><p><span class="term"><em class="parameter"><code>error</code></em> :</span></p></td>
|
1907
|
-
<td>location to store the error occuring, or <a class="link" href="glib-Standard-Macros.html#NULL:CAPS" title="NULL"><code class="literal">NULL</code></a> to ignore errors
|
1908
|
-
</td>
|
1909
|
-
</tr>
|
1910
|
-
<tr>
|
1911
|
-
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
|
1912
|
-
<td> a newly allocated string containing the replacements
|
1913
|
-
|
1914
|
-
</td>
|
1915
|
-
</tr>
|
1916
|
-
</tbody>
|
1917
|
-
</table></div>
|
1918
|
-
<p class="since">Since 2.14</p>
|
1919
|
-
</div>
|
1920
|
-
<hr>
|
1921
|
-
<div class="refsect2">
|
1922
|
-
<a name="g-regex-replace-literal"></a><h3>g_regex_replace_literal ()</h3>
|
1923
|
-
<pre class="programlisting"><a class="link" href="glib-Basic-Types.html#gchar" title="gchar"><span class="returnvalue">gchar</span></a> * g_regex_replace_literal (<em class="parameter"><code>const <a class="link" href="glib-Perl-compatible-regular-expressions.html#GRegex" title="GRegex"><span class="type">GRegex</span></a> *regex</code></em>,
|
1924
|
-
<em class="parameter"><code>const <a class="link" href="glib-Basic-Types.html#gchar" title="gchar"><span class="type">gchar</span></a> *string</code></em>,
|
1925
|
-
<em class="parameter"><code><a class="link" href="glib-Basic-Types.html#gssize" title="gssize"><span class="type">gssize</span></a> string_len</code></em>,
|
1926
|
-
<em class="parameter"><code><a class="link" href="glib-Basic-Types.html#gint" title="gint"><span class="type">gint</span></a> start_position</code></em>,
|
1927
|
-
<em class="parameter"><code>const <a class="link" href="glib-Basic-Types.html#gchar" title="gchar"><span class="type">gchar</span></a> *replacement</code></em>,
|
1928
|
-
<em class="parameter"><code><a class="link" href="glib-Perl-compatible-regular-expressions.html#GRegexMatchFlags" title="enum GRegexMatchFlags"><span class="type">GRegexMatchFlags</span></a> match_options</code></em>,
|
1929
|
-
<em class="parameter"><code><a class="link" href="glib-Error-Reporting.html#GError" title="GError"><span class="type">GError</span></a> **error</code></em>);</pre>
|
1930
|
-
<p>
|
1931
|
-
Replaces all occurrences of the pattern in <em class="parameter"><code>regex</code></em> with the
|
1932
|
-
replacement text. <em class="parameter"><code>replacement</code></em> is replaced literally, to
|
1933
|
-
include backreferences use <a class="link" href="glib-Perl-compatible-regular-expressions.html#g-regex-replace" title="g_regex_replace ()"><code class="function">g_regex_replace()</code></a>.
|
1934
|
-
</p>
|
1935
|
-
<p>
|
1936
|
-
Setting <em class="parameter"><code>start_position</code></em> differs from just passing over a
|
1937
|
-
shortened string and setting <a class="link" href="glib-Perl-compatible-regular-expressions.html#G-REGEX-MATCH-NOTBOL:CAPS"><span class="type">G_REGEX_MATCH_NOTBOL</span></a> in the
|
1938
|
-
case of a pattern that begins with any kind of lookbehind
|
1939
|
-
assertion, such as "\b".
|
1940
|
-
</p>
|
1941
|
-
<div class="variablelist"><table border="0">
|
1942
|
-
<col align="left" valign="top">
|
1943
|
-
<tbody>
|
1944
|
-
<tr>
|
1945
|
-
<td><p><span class="term"><em class="parameter"><code>regex</code></em> :</span></p></td>
|
1946
|
-
<td>a <a class="link" href="glib-Perl-compatible-regular-expressions.html#GRegex" title="GRegex"><span class="type">GRegex</span></a> structure
|
1947
|
-
</td>
|
1948
|
-
</tr>
|
1949
|
-
<tr>
|
1950
|
-
<td><p><span class="term"><em class="parameter"><code>string</code></em> :</span></p></td>
|
1951
|
-
<td> the string to perform matches against. <span class="annotation">[<acronym title="Parameter points to an array of items."><span class="acronym">array</span></acronym> length=string_len]</span>
|
1952
|
-
</td>
|
1953
|
-
</tr>
|
1954
|
-
<tr>
|
1955
|
-
<td><p><span class="term"><em class="parameter"><code>string_len</code></em> :</span></p></td>
|
1956
|
-
<td>the length of <em class="parameter"><code>string</code></em>, or -1 if <em class="parameter"><code>string</code></em> is nul-terminated
|
1957
|
-
</td>
|
1958
|
-
</tr>
|
1959
|
-
<tr>
|
1960
|
-
<td><p><span class="term"><em class="parameter"><code>start_position</code></em> :</span></p></td>
|
1961
|
-
<td>starting index of the string to match
|
1962
|
-
</td>
|
1963
|
-
</tr>
|
1964
|
-
<tr>
|
1965
|
-
<td><p><span class="term"><em class="parameter"><code>replacement</code></em> :</span></p></td>
|
1966
|
-
<td>text to replace each match with
|
1967
|
-
</td>
|
1968
|
-
</tr>
|
1969
|
-
<tr>
|
1970
|
-
<td><p><span class="term"><em class="parameter"><code>match_options</code></em> :</span></p></td>
|
1971
|
-
<td>options for the match
|
1972
|
-
</td>
|
1973
|
-
</tr>
|
1974
|
-
<tr>
|
1975
|
-
<td><p><span class="term"><em class="parameter"><code>error</code></em> :</span></p></td>
|
1976
|
-
<td>location to store the error occuring, or <a class="link" href="glib-Standard-Macros.html#NULL:CAPS" title="NULL"><code class="literal">NULL</code></a> to ignore errors
|
1977
|
-
</td>
|
1978
|
-
</tr>
|
1979
|
-
<tr>
|
1980
|
-
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
|
1981
|
-
<td> a newly allocated string containing the replacements
|
1982
|
-
|
1983
|
-
</td>
|
1984
|
-
</tr>
|
1985
|
-
</tbody>
|
1986
|
-
</table></div>
|
1987
|
-
<p class="since">Since 2.14</p>
|
1988
|
-
</div>
|
1989
|
-
<hr>
|
1990
|
-
<div class="refsect2">
|
1991
|
-
<a name="g-regex-replace-eval"></a><h3>g_regex_replace_eval ()</h3>
|
1992
|
-
<pre class="programlisting"><a class="link" href="glib-Basic-Types.html#gchar" title="gchar"><span class="returnvalue">gchar</span></a> * g_regex_replace_eval (<em class="parameter"><code>const <a class="link" href="glib-Perl-compatible-regular-expressions.html#GRegex" title="GRegex"><span class="type">GRegex</span></a> *regex</code></em>,
|
1993
|
-
<em class="parameter"><code>const <a class="link" href="glib-Basic-Types.html#gchar" title="gchar"><span class="type">gchar</span></a> *string</code></em>,
|
1994
|
-
<em class="parameter"><code><a class="link" href="glib-Basic-Types.html#gssize" title="gssize"><span class="type">gssize</span></a> string_len</code></em>,
|
1995
|
-
<em class="parameter"><code><a class="link" href="glib-Basic-Types.html#gint" title="gint"><span class="type">gint</span></a> start_position</code></em>,
|
1996
|
-
<em class="parameter"><code><a class="link" href="glib-Perl-compatible-regular-expressions.html#GRegexMatchFlags" title="enum GRegexMatchFlags"><span class="type">GRegexMatchFlags</span></a> match_options</code></em>,
|
1997
|
-
<em class="parameter"><code><a class="link" href="glib-Perl-compatible-regular-expressions.html#GRegexEvalCallback" title="GRegexEvalCallback ()"><span class="type">GRegexEvalCallback</span></a> eval</code></em>,
|
1998
|
-
<em class="parameter"><code><a class="link" href="glib-Basic-Types.html#gpointer" title="gpointer"><span class="type">gpointer</span></a> user_data</code></em>,
|
1999
|
-
<em class="parameter"><code><a class="link" href="glib-Error-Reporting.html#GError" title="GError"><span class="type">GError</span></a> **error</code></em>);</pre>
|
2000
|
-
<p>
|
2001
|
-
Replaces occurrences of the pattern in regex with the output of
|
2002
|
-
<em class="parameter"><code>eval</code></em> for that occurrence.
|
2003
|
-
</p>
|
2004
|
-
<p>
|
2005
|
-
Setting <em class="parameter"><code>start_position</code></em> differs from just passing over a shortened
|
2006
|
-
string and setting <a class="link" href="glib-Perl-compatible-regular-expressions.html#G-REGEX-MATCH-NOTBOL:CAPS"><span class="type">G_REGEX_MATCH_NOTBOL</span></a> in the case of a pattern
|
2007
|
-
that begins with any kind of lookbehind assertion, such as "\b".
|
2008
|
-
</p>
|
2009
|
-
<p>
|
2010
|
-
The following example uses <a class="link" href="glib-Perl-compatible-regular-expressions.html#g-regex-replace-eval" title="g_regex_replace_eval ()"><code class="function">g_regex_replace_eval()</code></a> to replace multiple
|
2011
|
-
strings at once:
|
2012
|
-
</p>
|
2013
|
-
<div class="informalexample">
|
2014
|
-
<table class="listing_frame" border="0" cellpadding="0" cellspacing="0">
|
2015
|
-
<tbody>
|
2016
|
-
<tr>
|
2017
|
-
<td class="listing_lines" align="right"><pre>1
|
2018
|
-
2
|
2019
|
-
3
|
2020
|
-
4
|
2021
|
-
5
|
2022
|
-
6
|
2023
|
-
7
|
2024
|
-
8
|
2025
|
-
9
|
2026
|
-
10
|
2027
|
-
11
|
2028
|
-
12
|
2029
|
-
13
|
2030
|
-
14
|
2031
|
-
15
|
2032
|
-
16
|
2033
|
-
17
|
2034
|
-
18
|
2035
|
-
19
|
2036
|
-
20
|
2037
|
-
21
|
2038
|
-
22
|
2039
|
-
23
|
2040
|
-
24
|
2041
|
-
25
|
2042
|
-
26
|
2043
|
-
27
|
2044
|
-
28
|
2045
|
-
29
|
2046
|
-
30
|
2047
|
-
31
|
2048
|
-
32
|
2049
|
-
33
|
2050
|
-
34</pre></td>
|
2051
|
-
<td class="listing_code"><pre class="programlisting"><span class="keyword">static</span><span class="normal"> <a href="glib-Basic-Types.html#gboolean">gboolean</a></span>
|
2052
|
-
<span class="function">eval_cb</span><span class="normal"> </span><span class="symbol">(</span><span class="keyword">const</span><span class="normal"> </span><span class="usertype">GMatchInfo</span><span class="normal"> </span><span class="symbol">*</span><span class="normal">info</span><span class="symbol">,</span>
|
2053
|
-
<span class="normal"> </span><span class="usertype">GString</span><span class="normal"> </span><span class="symbol">*</span><span class="normal">res</span><span class="symbol">,</span>
|
2054
|
-
<span class="normal"> </span><span class="usertype">gpointer</span><span class="normal"> data</span><span class="symbol">)</span>
|
2055
|
-
<span class="cbracket">{</span>
|
2056
|
-
<span class="normal"> </span><span class="usertype">gchar</span><span class="normal"> </span><span class="symbol">*</span><span class="normal">match</span><span class="symbol">;</span>
|
2057
|
-
<span class="normal"> </span><span class="usertype">gchar</span><span class="normal"> </span><span class="symbol">*</span><span class="normal">r</span><span class="symbol">;</span>
|
2058
|
-
|
2059
|
-
<span class="normal"> match </span><span class="symbol">=</span><span class="normal"> </span><span class="function"><a href="glib-Perl-compatible-regular-expressions.html#g-match-info-fetch">g_match_info_fetch</a></span><span class="normal"> </span><span class="symbol">(</span><span class="normal">info</span><span class="symbol">,</span><span class="normal"> </span><span class="number">0</span><span class="symbol">);</span>
|
2060
|
-
<span class="normal"> r </span><span class="symbol">=</span><span class="normal"> </span><span class="function"><a href="glib-Hash-Tables.html#g-hash-table-lookup">g_hash_table_lookup</a></span><span class="normal"> </span><span class="symbol">((</span><span class="normal"><a href="glib-Hash-Tables.html#GHashTable">GHashTable</a> </span><span class="symbol">*)</span><span class="normal">data</span><span class="symbol">,</span><span class="normal"> match</span><span class="symbol">);</span>
|
2061
|
-
<span class="normal"> </span><span class="function"><a href="glib-Strings.html#g-string-append">g_string_append</a></span><span class="normal"> </span><span class="symbol">(</span><span class="normal">res</span><span class="symbol">,</span><span class="normal"> r</span><span class="symbol">);</span>
|
2062
|
-
<span class="normal"> </span><span class="function"><a href="glib-Memory-Allocation.html#g-free">g_free</a></span><span class="normal"> </span><span class="symbol">(</span><span class="normal">match</span><span class="symbol">);</span>
|
2063
|
-
|
2064
|
-
<span class="normal"> </span><span class="keyword">return</span><span class="normal"> <a href="glib-Standard-Macros.html#FALSE:CAPS">FALSE</a></span><span class="symbol">;</span>
|
2065
|
-
<span class="cbracket">}</span>
|
2066
|
-
|
2067
|
-
<span class="comment">/* ... */</span>
|
2068
|
-
|
2069
|
-
<span class="usertype">GRegex</span><span class="normal"> </span><span class="symbol">*</span><span class="normal">reg</span><span class="symbol">;</span>
|
2070
|
-
<span class="usertype">GHashTable</span><span class="normal"> </span><span class="symbol">*</span><span class="normal">h</span><span class="symbol">;</span>
|
2071
|
-
<span class="usertype">gchar</span><span class="normal"> </span><span class="symbol">*</span><span class="normal">res</span><span class="symbol">;</span>
|
2072
|
-
|
2073
|
-
<span class="normal">h </span><span class="symbol">=</span><span class="normal"> </span><span class="function"><a href="glib-Hash-Tables.html#g-hash-table-new">g_hash_table_new</a></span><span class="normal"> </span><span class="symbol">(</span><span class="normal"><a href="glib-Hash-Tables.html#g-str-hash">g_str_hash</a></span><span class="symbol">,</span><span class="normal"> <a href="glib-Hash-Tables.html#g-str-equal">g_str_equal</a></span><span class="symbol">);</span>
|
2074
|
-
|
2075
|
-
<span class="function"><a href="glib-Hash-Tables.html#g-hash-table-insert">g_hash_table_insert</a></span><span class="normal"> </span><span class="symbol">(</span><span class="normal">h</span><span class="symbol">,</span><span class="normal"> </span><span class="string">"1"</span><span class="symbol">,</span><span class="normal"> </span><span class="string">"ONE"</span><span class="symbol">);</span>
|
2076
|
-
<span class="function"><a href="glib-Hash-Tables.html#g-hash-table-insert">g_hash_table_insert</a></span><span class="normal"> </span><span class="symbol">(</span><span class="normal">h</span><span class="symbol">,</span><span class="normal"> </span><span class="string">"2"</span><span class="symbol">,</span><span class="normal"> </span><span class="string">"TWO"</span><span class="symbol">);</span>
|
2077
|
-
<span class="function"><a href="glib-Hash-Tables.html#g-hash-table-insert">g_hash_table_insert</a></span><span class="normal"> </span><span class="symbol">(</span><span class="normal">h</span><span class="symbol">,</span><span class="normal"> </span><span class="string">"3"</span><span class="symbol">,</span><span class="normal"> </span><span class="string">"THREE"</span><span class="symbol">);</span>
|
2078
|
-
<span class="function"><a href="glib-Hash-Tables.html#g-hash-table-insert">g_hash_table_insert</a></span><span class="normal"> </span><span class="symbol">(</span><span class="normal">h</span><span class="symbol">,</span><span class="normal"> </span><span class="string">"4"</span><span class="symbol">,</span><span class="normal"> </span><span class="string">"FOUR"</span><span class="symbol">);</span>
|
2079
|
-
|
2080
|
-
<span class="normal">reg </span><span class="symbol">=</span><span class="normal"> </span><span class="function"><a href="glib-Perl-compatible-regular-expressions.html#g-regex-new">g_regex_new</a></span><span class="normal"> </span><span class="symbol">(</span><span class="string">"1|2|3|4"</span><span class="symbol">,</span><span class="normal"> </span><span class="number">0</span><span class="symbol">,</span><span class="normal"> </span><span class="number">0</span><span class="symbol">,</span><span class="normal"> <a href="glib-Standard-Macros.html#NULL:CAPS">NULL</a></span><span class="symbol">);</span>
|
2081
|
-
<span class="normal">res </span><span class="symbol">=</span><span class="normal"> </span><span class="function"><a href="glib-Perl-compatible-regular-expressions.html#g-regex-replace-eval">g_regex_replace_eval</a></span><span class="normal"> </span><span class="symbol">(</span><span class="normal">reg</span><span class="symbol">,</span><span class="normal"> text</span><span class="symbol">,</span><span class="normal"> </span><span class="symbol">-</span><span class="number">1</span><span class="symbol">,</span><span class="normal"> </span><span class="number">0</span><span class="symbol">,</span><span class="normal"> </span><span class="number">0</span><span class="symbol">,</span><span class="normal"> eval_cb</span><span class="symbol">,</span><span class="normal"> h</span><span class="symbol">,</span><span class="normal"> <a href="glib-Standard-Macros.html#NULL:CAPS">NULL</a></span><span class="symbol">);</span>
|
2082
|
-
<span class="function"><a href="glib-Hash-Tables.html#g-hash-table-destroy">g_hash_table_destroy</a></span><span class="normal"> </span><span class="symbol">(</span><span class="normal">h</span><span class="symbol">);</span>
|
2083
|
-
|
2084
|
-
<span class="comment">/* ... */</span></pre></td>
|
2085
|
-
</tr>
|
2086
|
-
</tbody>
|
2087
|
-
</table>
|
2088
|
-
</div>
|
2089
|
-
|
2090
|
-
<p>
|
2091
|
-
</p>
|
2092
|
-
<div class="variablelist"><table border="0">
|
2093
|
-
<col align="left" valign="top">
|
2094
|
-
<tbody>
|
2095
|
-
<tr>
|
2096
|
-
<td><p><span class="term"><em class="parameter"><code>regex</code></em> :</span></p></td>
|
2097
|
-
<td>a <a class="link" href="glib-Perl-compatible-regular-expressions.html#GRegex" title="GRegex"><span class="type">GRegex</span></a> structure from <a class="link" href="glib-Perl-compatible-regular-expressions.html#g-regex-new" title="g_regex_new ()"><code class="function">g_regex_new()</code></a>
|
2098
|
-
</td>
|
2099
|
-
</tr>
|
2100
|
-
<tr>
|
2101
|
-
<td><p><span class="term"><em class="parameter"><code>string</code></em> :</span></p></td>
|
2102
|
-
<td> string to perform matches against. <span class="annotation">[<acronym title="Parameter points to an array of items."><span class="acronym">array</span></acronym> length=string_len]</span>
|
2103
|
-
</td>
|
2104
|
-
</tr>
|
2105
|
-
<tr>
|
2106
|
-
<td><p><span class="term"><em class="parameter"><code>string_len</code></em> :</span></p></td>
|
2107
|
-
<td>the length of <em class="parameter"><code>string</code></em>, or -1 if <em class="parameter"><code>string</code></em> is nul-terminated
|
2108
|
-
</td>
|
2109
|
-
</tr>
|
2110
|
-
<tr>
|
2111
|
-
<td><p><span class="term"><em class="parameter"><code>start_position</code></em> :</span></p></td>
|
2112
|
-
<td>starting index of the string to match
|
2113
|
-
</td>
|
2114
|
-
</tr>
|
2115
|
-
<tr>
|
2116
|
-
<td><p><span class="term"><em class="parameter"><code>match_options</code></em> :</span></p></td>
|
2117
|
-
<td>options for the match
|
2118
|
-
</td>
|
2119
|
-
</tr>
|
2120
|
-
<tr>
|
2121
|
-
<td><p><span class="term"><em class="parameter"><code>eval</code></em> :</span></p></td>
|
2122
|
-
<td>a function to call for each match
|
2123
|
-
</td>
|
2124
|
-
</tr>
|
2125
|
-
<tr>
|
2126
|
-
<td><p><span class="term"><em class="parameter"><code>user_data</code></em> :</span></p></td>
|
2127
|
-
<td>user data to pass to the function
|
2128
|
-
</td>
|
2129
|
-
</tr>
|
2130
|
-
<tr>
|
2131
|
-
<td><p><span class="term"><em class="parameter"><code>error</code></em> :</span></p></td>
|
2132
|
-
<td>location to store the error occuring, or <a class="link" href="glib-Standard-Macros.html#NULL:CAPS" title="NULL"><code class="literal">NULL</code></a> to ignore errors
|
2133
|
-
</td>
|
2134
|
-
</tr>
|
2135
|
-
<tr>
|
2136
|
-
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
|
2137
|
-
<td> a newly allocated string containing the replacements
|
2138
|
-
|
2139
|
-
</td>
|
2140
|
-
</tr>
|
2141
|
-
</tbody>
|
2142
|
-
</table></div>
|
2143
|
-
<p class="since">Since 2.14</p>
|
2144
|
-
</div>
|
2145
|
-
<hr>
|
2146
|
-
<div class="refsect2">
|
2147
|
-
<a name="g-regex-check-replacement"></a><h3>g_regex_check_replacement ()</h3>
|
2148
|
-
<pre class="programlisting"><a class="link" href="glib-Basic-Types.html#gboolean" title="gboolean"><span class="returnvalue">gboolean</span></a> g_regex_check_replacement (<em class="parameter"><code>const <a class="link" href="glib-Basic-Types.html#gchar" title="gchar"><span class="type">gchar</span></a> *replacement</code></em>,
|
2149
|
-
<em class="parameter"><code><a class="link" href="glib-Basic-Types.html#gboolean" title="gboolean"><span class="type">gboolean</span></a> *has_references</code></em>,
|
2150
|
-
<em class="parameter"><code><a class="link" href="glib-Error-Reporting.html#GError" title="GError"><span class="type">GError</span></a> **error</code></em>);</pre>
|
2151
|
-
<p>
|
2152
|
-
Checks whether <em class="parameter"><code>replacement</code></em> is a valid replacement string
|
2153
|
-
(see <a class="link" href="glib-Perl-compatible-regular-expressions.html#g-regex-replace" title="g_regex_replace ()"><code class="function">g_regex_replace()</code></a>), i.e. that all escape sequences in
|
2154
|
-
it are valid.
|
2155
|
-
</p>
|
2156
|
-
<p>
|
2157
|
-
If <em class="parameter"><code>has_references</code></em> is not <a class="link" href="glib-Standard-Macros.html#NULL:CAPS" title="NULL"><code class="literal">NULL</code></a> then <em class="parameter"><code>replacement</code></em> is checked
|
2158
|
-
for pattern references. For instance, replacement text 'foo\n'
|
2159
|
-
does not contain references and may be evaluated without information
|
2160
|
-
about actual match, but '\0\1' (whole match followed by first
|
2161
|
-
subpattern) requires valid <a class="link" href="glib-Perl-compatible-regular-expressions.html#GMatchInfo" title="GMatchInfo"><span class="type">GMatchInfo</span></a> object.
|
2162
|
-
</p>
|
2163
|
-
<div class="variablelist"><table border="0">
|
2164
|
-
<col align="left" valign="top">
|
2165
|
-
<tbody>
|
2166
|
-
<tr>
|
2167
|
-
<td><p><span class="term"><em class="parameter"><code>replacement</code></em> :</span></p></td>
|
2168
|
-
<td>the replacement string
|
2169
|
-
</td>
|
2170
|
-
</tr>
|
2171
|
-
<tr>
|
2172
|
-
<td><p><span class="term"><em class="parameter"><code>has_references</code></em> :</span></p></td>
|
2173
|
-
<td> location to store information about
|
2174
|
-
references in <em class="parameter"><code>replacement</code></em> or <a class="link" href="glib-Standard-Macros.html#NULL:CAPS" title="NULL"><code class="literal">NULL</code></a>. <span class="annotation">[<acronym title="Parameter for returning results. Default is transfer full."><span class="acronym">out</span></acronym>][<acronym title="NULL is ok, both for passing and for returning."><span class="acronym">allow-none</span></acronym>]</span>
|
2175
|
-
</td>
|
2176
|
-
</tr>
|
2177
|
-
<tr>
|
2178
|
-
<td><p><span class="term"><em class="parameter"><code>error</code></em> :</span></p></td>
|
2179
|
-
<td>location to store error
|
2180
|
-
</td>
|
2181
|
-
</tr>
|
2182
|
-
<tr>
|
2183
|
-
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
|
2184
|
-
<td> whether <em class="parameter"><code>replacement</code></em> is a valid replacement string
|
2185
|
-
|
2186
|
-
</td>
|
2187
|
-
</tr>
|
2188
|
-
</tbody>
|
2189
|
-
</table></div>
|
2190
|
-
<p class="since">Since 2.14</p>
|
2191
|
-
</div>
|
2192
|
-
<hr>
|
2193
|
-
<div class="refsect2">
|
2194
|
-
<a name="GMatchInfo"></a><h3>GMatchInfo</h3>
|
2195
|
-
<pre class="programlisting">typedef struct _GMatchInfo GMatchInfo;</pre>
|
2196
|
-
<p>
|
2197
|
-
<a class="link" href="glib-Perl-compatible-regular-expressions.html#GMatchInfo" title="GMatchInfo"><span class="type">GMatchInfo</span></a> is used to retrieve information about the regular expression match
|
2198
|
-
which created it.
|
2199
|
-
This structure is opaque and its fields cannot be accessed directly.
|
2200
|
-
</p>
|
2201
|
-
<p class="since">Since 2.14</p>
|
2202
|
-
</div>
|
2203
|
-
<hr>
|
2204
|
-
<div class="refsect2">
|
2205
|
-
<a name="g-match-info-get-regex"></a><h3>g_match_info_get_regex ()</h3>
|
2206
|
-
<pre class="programlisting"><a class="link" href="glib-Perl-compatible-regular-expressions.html#GRegex" title="GRegex"><span class="returnvalue">GRegex</span></a> * g_match_info_get_regex (<em class="parameter"><code>const <a class="link" href="glib-Perl-compatible-regular-expressions.html#GMatchInfo" title="GMatchInfo"><span class="type">GMatchInfo</span></a> *match_info</code></em>);</pre>
|
2207
|
-
<p>
|
2208
|
-
Returns <a class="link" href="glib-Perl-compatible-regular-expressions.html#GRegex" title="GRegex"><span class="type">GRegex</span></a> object used in <em class="parameter"><code>match_info</code></em>. It belongs to Glib
|
2209
|
-
and must not be freed. Use <a class="link" href="glib-Perl-compatible-regular-expressions.html#g-regex-ref" title="g_regex_ref ()"><code class="function">g_regex_ref()</code></a> if you need to keep it
|
2210
|
-
after you free <em class="parameter"><code>match_info</code></em> object.
|
2211
|
-
</p>
|
2212
|
-
<div class="variablelist"><table border="0">
|
2213
|
-
<col align="left" valign="top">
|
2214
|
-
<tbody>
|
2215
|
-
<tr>
|
2216
|
-
<td><p><span class="term"><em class="parameter"><code>match_info</code></em> :</span></p></td>
|
2217
|
-
<td>a <a class="link" href="glib-Perl-compatible-regular-expressions.html#GMatchInfo" title="GMatchInfo"><span class="type">GMatchInfo</span></a>
|
2218
|
-
</td>
|
2219
|
-
</tr>
|
2220
|
-
<tr>
|
2221
|
-
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
|
2222
|
-
<td> <a class="link" href="glib-Perl-compatible-regular-expressions.html#GRegex" title="GRegex"><span class="type">GRegex</span></a> object used in <em class="parameter"><code>match_info</code></em>
|
2223
|
-
|
2224
|
-
</td>
|
2225
|
-
</tr>
|
2226
|
-
</tbody>
|
2227
|
-
</table></div>
|
2228
|
-
<p class="since">Since 2.14</p>
|
2229
|
-
</div>
|
2230
|
-
<hr>
|
2231
|
-
<div class="refsect2">
|
2232
|
-
<a name="g-match-info-get-string"></a><h3>g_match_info_get_string ()</h3>
|
2233
|
-
<pre class="programlisting">const <a class="link" href="glib-Basic-Types.html#gchar" title="gchar"><span class="returnvalue">gchar</span></a> * g_match_info_get_string (<em class="parameter"><code>const <a class="link" href="glib-Perl-compatible-regular-expressions.html#GMatchInfo" title="GMatchInfo"><span class="type">GMatchInfo</span></a> *match_info</code></em>);</pre>
|
2234
|
-
<p>
|
2235
|
-
Returns the string searched with <em class="parameter"><code>match_info</code></em>. This is the
|
2236
|
-
string passed to <a class="link" href="glib-Perl-compatible-regular-expressions.html#g-regex-match" title="g_regex_match ()"><code class="function">g_regex_match()</code></a> or <a class="link" href="glib-Perl-compatible-regular-expressions.html#g-regex-replace" title="g_regex_replace ()"><code class="function">g_regex_replace()</code></a> so
|
2237
|
-
you may not free it before calling this function.
|
2238
|
-
</p>
|
2239
|
-
<div class="variablelist"><table border="0">
|
2240
|
-
<col align="left" valign="top">
|
2241
|
-
<tbody>
|
2242
|
-
<tr>
|
2243
|
-
<td><p><span class="term"><em class="parameter"><code>match_info</code></em> :</span></p></td>
|
2244
|
-
<td>a <a class="link" href="glib-Perl-compatible-regular-expressions.html#GMatchInfo" title="GMatchInfo"><span class="type">GMatchInfo</span></a>
|
2245
|
-
</td>
|
2246
|
-
</tr>
|
2247
|
-
<tr>
|
2248
|
-
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
|
2249
|
-
<td> the string searched with <em class="parameter"><code>match_info</code></em>
|
2250
|
-
|
2251
|
-
</td>
|
2252
|
-
</tr>
|
2253
|
-
</tbody>
|
2254
|
-
</table></div>
|
2255
|
-
<p class="since">Since 2.14</p>
|
2256
|
-
</div>
|
2257
|
-
<hr>
|
2258
|
-
<div class="refsect2">
|
2259
|
-
<a name="g-match-info-free"></a><h3>g_match_info_free ()</h3>
|
2260
|
-
<pre class="programlisting"><span class="returnvalue">void</span> g_match_info_free (<em class="parameter"><code><a class="link" href="glib-Perl-compatible-regular-expressions.html#GMatchInfo" title="GMatchInfo"><span class="type">GMatchInfo</span></a> *match_info</code></em>);</pre>
|
2261
|
-
<p>
|
2262
|
-
Frees all the memory associated with the <a class="link" href="glib-Perl-compatible-regular-expressions.html#GMatchInfo" title="GMatchInfo"><span class="type">GMatchInfo</span></a> structure.
|
2263
|
-
</p>
|
2264
|
-
<div class="variablelist"><table border="0">
|
2265
|
-
<col align="left" valign="top">
|
2266
|
-
<tbody><tr>
|
2267
|
-
<td><p><span class="term"><em class="parameter"><code>match_info</code></em> :</span></p></td>
|
2268
|
-
<td>a <a class="link" href="glib-Perl-compatible-regular-expressions.html#GMatchInfo" title="GMatchInfo"><span class="type">GMatchInfo</span></a>
|
2269
|
-
</td>
|
2270
|
-
</tr></tbody>
|
2271
|
-
</table></div>
|
2272
|
-
<p class="since">Since 2.14</p>
|
2273
|
-
</div>
|
2274
|
-
<hr>
|
2275
|
-
<div class="refsect2">
|
2276
|
-
<a name="g-match-info-matches"></a><h3>g_match_info_matches ()</h3>
|
2277
|
-
<pre class="programlisting"><a class="link" href="glib-Basic-Types.html#gboolean" title="gboolean"><span class="returnvalue">gboolean</span></a> g_match_info_matches (<em class="parameter"><code>const <a class="link" href="glib-Perl-compatible-regular-expressions.html#GMatchInfo" title="GMatchInfo"><span class="type">GMatchInfo</span></a> *match_info</code></em>);</pre>
|
2278
|
-
<p>
|
2279
|
-
Returns whether the previous match operation succeeded.
|
2280
|
-
</p>
|
2281
|
-
<div class="variablelist"><table border="0">
|
2282
|
-
<col align="left" valign="top">
|
2283
|
-
<tbody>
|
2284
|
-
<tr>
|
2285
|
-
<td><p><span class="term"><em class="parameter"><code>match_info</code></em> :</span></p></td>
|
2286
|
-
<td>a <a class="link" href="glib-Perl-compatible-regular-expressions.html#GMatchInfo" title="GMatchInfo"><span class="type">GMatchInfo</span></a> structure
|
2287
|
-
</td>
|
2288
|
-
</tr>
|
2289
|
-
<tr>
|
2290
|
-
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
|
2291
|
-
<td> <a class="link" href="glib-Standard-Macros.html#TRUE:CAPS" title="TRUE"><code class="literal">TRUE</code></a> if the previous match operation succeeded,
|
2292
|
-
<a class="link" href="glib-Standard-Macros.html#FALSE:CAPS" title="FALSE"><code class="literal">FALSE</code></a> otherwise
|
2293
|
-
|
2294
|
-
</td>
|
2295
|
-
</tr>
|
2296
|
-
</tbody>
|
2297
|
-
</table></div>
|
2298
|
-
<p class="since">Since 2.14</p>
|
2299
|
-
</div>
|
2300
|
-
<hr>
|
2301
|
-
<div class="refsect2">
|
2302
|
-
<a name="g-match-info-next"></a><h3>g_match_info_next ()</h3>
|
2303
|
-
<pre class="programlisting"><a class="link" href="glib-Basic-Types.html#gboolean" title="gboolean"><span class="returnvalue">gboolean</span></a> g_match_info_next (<em class="parameter"><code><a class="link" href="glib-Perl-compatible-regular-expressions.html#GMatchInfo" title="GMatchInfo"><span class="type">GMatchInfo</span></a> *match_info</code></em>,
|
2304
|
-
<em class="parameter"><code><a class="link" href="glib-Error-Reporting.html#GError" title="GError"><span class="type">GError</span></a> **error</code></em>);</pre>
|
2305
|
-
<p>
|
2306
|
-
Scans for the next match using the same parameters of the previous
|
2307
|
-
call to <a class="link" href="glib-Perl-compatible-regular-expressions.html#g-regex-match-full" title="g_regex_match_full ()"><code class="function">g_regex_match_full()</code></a> or <a class="link" href="glib-Perl-compatible-regular-expressions.html#g-regex-match" title="g_regex_match ()"><code class="function">g_regex_match()</code></a> that returned
|
2308
|
-
<em class="parameter"><code>match_info</code></em>.
|
2309
|
-
</p>
|
2310
|
-
<p>
|
2311
|
-
The match is done on the string passed to the match function, so you
|
2312
|
-
cannot free it before calling this function.
|
2313
|
-
</p>
|
2314
|
-
<div class="variablelist"><table border="0">
|
2315
|
-
<col align="left" valign="top">
|
2316
|
-
<tbody>
|
2317
|
-
<tr>
|
2318
|
-
<td><p><span class="term"><em class="parameter"><code>match_info</code></em> :</span></p></td>
|
2319
|
-
<td>a <a class="link" href="glib-Perl-compatible-regular-expressions.html#GMatchInfo" title="GMatchInfo"><span class="type">GMatchInfo</span></a> structure
|
2320
|
-
</td>
|
2321
|
-
</tr>
|
2322
|
-
<tr>
|
2323
|
-
<td><p><span class="term"><em class="parameter"><code>error</code></em> :</span></p></td>
|
2324
|
-
<td>location to store the error occuring, or <a class="link" href="glib-Standard-Macros.html#NULL:CAPS" title="NULL"><code class="literal">NULL</code></a> to ignore errors
|
2325
|
-
</td>
|
2326
|
-
</tr>
|
2327
|
-
<tr>
|
2328
|
-
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
|
2329
|
-
<td> <a class="link" href="glib-Standard-Macros.html#TRUE:CAPS" title="TRUE"><code class="literal">TRUE</code></a> is the string matched, <a class="link" href="glib-Standard-Macros.html#FALSE:CAPS" title="FALSE"><code class="literal">FALSE</code></a> otherwise
|
2330
|
-
|
2331
|
-
</td>
|
2332
|
-
</tr>
|
2333
|
-
</tbody>
|
2334
|
-
</table></div>
|
2335
|
-
<p class="since">Since 2.14</p>
|
2336
|
-
</div>
|
2337
|
-
<hr>
|
2338
|
-
<div class="refsect2">
|
2339
|
-
<a name="g-match-info-get-match-count"></a><h3>g_match_info_get_match_count ()</h3>
|
2340
|
-
<pre class="programlisting"><a class="link" href="glib-Basic-Types.html#gint" title="gint"><span class="returnvalue">gint</span></a> g_match_info_get_match_count (<em class="parameter"><code>const <a class="link" href="glib-Perl-compatible-regular-expressions.html#GMatchInfo" title="GMatchInfo"><span class="type">GMatchInfo</span></a> *match_info</code></em>);</pre>
|
2341
|
-
<p>
|
2342
|
-
Retrieves the number of matched substrings (including substring 0,
|
2343
|
-
that is the whole matched text), so 1 is returned if the pattern
|
2344
|
-
has no substrings in it and 0 is returned if the match failed.
|
2345
|
-
</p>
|
2346
|
-
<p>
|
2347
|
-
If the last match was obtained using the DFA algorithm, that is
|
2348
|
-
using <a class="link" href="glib-Perl-compatible-regular-expressions.html#g-regex-match-all" title="g_regex_match_all ()"><code class="function">g_regex_match_all()</code></a> or <a class="link" href="glib-Perl-compatible-regular-expressions.html#g-regex-match-all-full" title="g_regex_match_all_full ()"><code class="function">g_regex_match_all_full()</code></a>, the retrieved
|
2349
|
-
count is not that of the number of capturing parentheses but that of
|
2350
|
-
the number of matched substrings.
|
2351
|
-
</p>
|
2352
|
-
<div class="variablelist"><table border="0">
|
2353
|
-
<col align="left" valign="top">
|
2354
|
-
<tbody>
|
2355
|
-
<tr>
|
2356
|
-
<td><p><span class="term"><em class="parameter"><code>match_info</code></em> :</span></p></td>
|
2357
|
-
<td>a <a class="link" href="glib-Perl-compatible-regular-expressions.html#GMatchInfo" title="GMatchInfo"><span class="type">GMatchInfo</span></a> structure
|
2358
|
-
</td>
|
2359
|
-
</tr>
|
2360
|
-
<tr>
|
2361
|
-
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
|
2362
|
-
<td> Number of matched substrings, or -1 if an error occurred
|
2363
|
-
|
2364
|
-
</td>
|
2365
|
-
</tr>
|
2366
|
-
</tbody>
|
2367
|
-
</table></div>
|
2368
|
-
<p class="since">Since 2.14</p>
|
2369
|
-
</div>
|
2370
|
-
<hr>
|
2371
|
-
<div class="refsect2">
|
2372
|
-
<a name="g-match-info-is-partial-match"></a><h3>g_match_info_is_partial_match ()</h3>
|
2373
|
-
<pre class="programlisting"><a class="link" href="glib-Basic-Types.html#gboolean" title="gboolean"><span class="returnvalue">gboolean</span></a> g_match_info_is_partial_match (<em class="parameter"><code>const <a class="link" href="glib-Perl-compatible-regular-expressions.html#GMatchInfo" title="GMatchInfo"><span class="type">GMatchInfo</span></a> *match_info</code></em>);</pre>
|
2374
|
-
<p>
|
2375
|
-
Usually if the string passed to g_regex_match*() matches as far as
|
2376
|
-
it goes, but is too short to match the entire pattern, <a class="link" href="glib-Standard-Macros.html#FALSE:CAPS" title="FALSE"><code class="literal">FALSE</code></a> is
|
2377
|
-
returned. There are circumstances where it might be helpful to
|
2378
|
-
distinguish this case from other cases in which there is no match.
|
2379
|
-
</p>
|
2380
|
-
<p>
|
2381
|
-
Consider, for example, an application where a human is required to
|
2382
|
-
type in data for a field with specific formatting requirements. An
|
2383
|
-
example might be a date in the form ddmmmyy, defined by the pattern
|
2384
|
-
"^\d?\d(jan|feb|mar|apr|may|jun|jul|aug|sep|oct|nov|dec)\d\d$".
|
2385
|
-
If the application sees the user’s keystrokes one by one, and can
|
2386
|
-
check that what has been typed so far is potentially valid, it is
|
2387
|
-
able to raise an error as soon as a mistake is made.
|
2388
|
-
</p>
|
2389
|
-
<p>
|
2390
|
-
GRegex supports the concept of partial matching by means of the
|
2391
|
-
<a class="link" href="glib-Perl-compatible-regular-expressions.html#G-REGEX-MATCH-PARTIAL:CAPS"><span class="type">G_REGEX_MATCH_PARTIAL</span></a> flag. When this is set the return code for
|
2392
|
-
<a class="link" href="glib-Perl-compatible-regular-expressions.html#g-regex-match" title="g_regex_match ()"><code class="function">g_regex_match()</code></a> or <a class="link" href="glib-Perl-compatible-regular-expressions.html#g-regex-match-full" title="g_regex_match_full ()"><code class="function">g_regex_match_full()</code></a> is, as usual, <a class="link" href="glib-Standard-Macros.html#TRUE:CAPS" title="TRUE"><code class="literal">TRUE</code></a>
|
2393
|
-
for a complete match, <a class="link" href="glib-Standard-Macros.html#FALSE:CAPS" title="FALSE"><code class="literal">FALSE</code></a> otherwise. But, when these functions
|
2394
|
-
return <a class="link" href="glib-Standard-Macros.html#FALSE:CAPS" title="FALSE"><code class="literal">FALSE</code></a>, you can check if the match was partial calling
|
2395
|
-
<a class="link" href="glib-Perl-compatible-regular-expressions.html#g-match-info-is-partial-match" title="g_match_info_is_partial_match ()"><code class="function">g_match_info_is_partial_match()</code></a>.
|
2396
|
-
</p>
|
2397
|
-
<p>
|
2398
|
-
When using partial matching you cannot use g_match_info_fetch*().
|
2399
|
-
</p>
|
2400
|
-
<p>
|
2401
|
-
Because of the way certain internal optimizations are implemented
|
2402
|
-
the partial matching algorithm cannot be used with all patterns.
|
2403
|
-
So repeated single characters such as "a{2,4}" and repeated single
|
2404
|
-
meta-sequences such as "\d+" are not permitted if the maximum number
|
2405
|
-
of occurrences is greater than one. Optional items such as "\d?"
|
2406
|
-
(where the maximum is one) are permitted. Quantifiers with any values
|
2407
|
-
are permitted after parentheses, so the invalid examples above can be
|
2408
|
-
coded thus "(a){2,4}" and "(\d)+". If <a class="link" href="glib-Perl-compatible-regular-expressions.html#G-REGEX-MATCH-PARTIAL:CAPS"><span class="type">G_REGEX_MATCH_PARTIAL</span></a> is set
|
2409
|
-
for a pattern that does not conform to the restrictions, matching
|
2410
|
-
functions return an error.
|
2411
|
-
</p>
|
2412
|
-
<div class="variablelist"><table border="0">
|
2413
|
-
<col align="left" valign="top">
|
2414
|
-
<tbody>
|
2415
|
-
<tr>
|
2416
|
-
<td><p><span class="term"><em class="parameter"><code>match_info</code></em> :</span></p></td>
|
2417
|
-
<td>a <a class="link" href="glib-Perl-compatible-regular-expressions.html#GMatchInfo" title="GMatchInfo"><span class="type">GMatchInfo</span></a> structure
|
2418
|
-
</td>
|
2419
|
-
</tr>
|
2420
|
-
<tr>
|
2421
|
-
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
|
2422
|
-
<td> <a class="link" href="glib-Standard-Macros.html#TRUE:CAPS" title="TRUE"><code class="literal">TRUE</code></a> if the match was partial, <a class="link" href="glib-Standard-Macros.html#FALSE:CAPS" title="FALSE"><code class="literal">FALSE</code></a> otherwise
|
2423
|
-
|
2424
|
-
</td>
|
2425
|
-
</tr>
|
2426
|
-
</tbody>
|
2427
|
-
</table></div>
|
2428
|
-
<p class="since">Since 2.14</p>
|
2429
|
-
</div>
|
2430
|
-
<hr>
|
2431
|
-
<div class="refsect2">
|
2432
|
-
<a name="g-match-info-expand-references"></a><h3>g_match_info_expand_references ()</h3>
|
2433
|
-
<pre class="programlisting"><a class="link" href="glib-Basic-Types.html#gchar" title="gchar"><span class="returnvalue">gchar</span></a> * g_match_info_expand_references (<em class="parameter"><code>const <a class="link" href="glib-Perl-compatible-regular-expressions.html#GMatchInfo" title="GMatchInfo"><span class="type">GMatchInfo</span></a> *match_info</code></em>,
|
2434
|
-
<em class="parameter"><code>const <a class="link" href="glib-Basic-Types.html#gchar" title="gchar"><span class="type">gchar</span></a> *string_to_expand</code></em>,
|
2435
|
-
<em class="parameter"><code><a class="link" href="glib-Error-Reporting.html#GError" title="GError"><span class="type">GError</span></a> **error</code></em>);</pre>
|
2436
|
-
<p>
|
2437
|
-
Returns a new string containing the text in <em class="parameter"><code>string_to_expand</code></em> with
|
2438
|
-
references and escape sequences expanded. References refer to the last
|
2439
|
-
match done with <em class="parameter"><code>string</code></em> against <em class="parameter"><code>regex</code></em> and have the same syntax used by
|
2440
|
-
<a class="link" href="glib-Perl-compatible-regular-expressions.html#g-regex-replace" title="g_regex_replace ()"><code class="function">g_regex_replace()</code></a>.
|
2441
|
-
</p>
|
2442
|
-
<p>
|
2443
|
-
The <em class="parameter"><code>string_to_expand</code></em> must be UTF-8 encoded even if <a class="link" href="glib-Perl-compatible-regular-expressions.html#G-REGEX-RAW:CAPS"><span class="type">G_REGEX_RAW</span></a> was
|
2444
|
-
passed to <a class="link" href="glib-Perl-compatible-regular-expressions.html#g-regex-new" title="g_regex_new ()"><code class="function">g_regex_new()</code></a>.
|
2445
|
-
</p>
|
2446
|
-
<p>
|
2447
|
-
The backreferences are extracted from the string passed to the match
|
2448
|
-
function, so you cannot call this function after freeing the string.
|
2449
|
-
</p>
|
2450
|
-
<p>
|
2451
|
-
<em class="parameter"><code>match_info</code></em> may be <a class="link" href="glib-Standard-Macros.html#NULL:CAPS" title="NULL"><code class="literal">NULL</code></a> in which case <em class="parameter"><code>string_to_expand</code></em> must not
|
2452
|
-
contain references. For instance "foo\n" does not refer to an actual
|
2453
|
-
pattern and '\n' merely will be replaced with \n character,
|
2454
|
-
while to expand "\0" (whole match) one needs the result of a match.
|
2455
|
-
Use <a class="link" href="glib-Perl-compatible-regular-expressions.html#g-regex-check-replacement" title="g_regex_check_replacement ()"><code class="function">g_regex_check_replacement()</code></a> to find out whether <em class="parameter"><code>string_to_expand</code></em>
|
2456
|
-
contains references.
|
2457
|
-
</p>
|
2458
|
-
<div class="variablelist"><table border="0">
|
2459
|
-
<col align="left" valign="top">
|
2460
|
-
<tbody>
|
2461
|
-
<tr>
|
2462
|
-
<td><p><span class="term"><em class="parameter"><code>match_info</code></em> :</span></p></td>
|
2463
|
-
<td>a <a class="link" href="glib-Perl-compatible-regular-expressions.html#GMatchInfo" title="GMatchInfo"><span class="type">GMatchInfo</span></a> or <a class="link" href="glib-Standard-Macros.html#NULL:CAPS" title="NULL"><code class="literal">NULL</code></a>
|
2464
|
-
</td>
|
2465
|
-
</tr>
|
2466
|
-
<tr>
|
2467
|
-
<td><p><span class="term"><em class="parameter"><code>string_to_expand</code></em> :</span></p></td>
|
2468
|
-
<td>the string to expand
|
2469
|
-
</td>
|
2470
|
-
</tr>
|
2471
|
-
<tr>
|
2472
|
-
<td><p><span class="term"><em class="parameter"><code>error</code></em> :</span></p></td>
|
2473
|
-
<td>location to store the error occuring, or <a class="link" href="glib-Standard-Macros.html#NULL:CAPS" title="NULL"><code class="literal">NULL</code></a> to ignore errors
|
2474
|
-
</td>
|
2475
|
-
</tr>
|
2476
|
-
<tr>
|
2477
|
-
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
|
2478
|
-
<td> the expanded string, or <a class="link" href="glib-Standard-Macros.html#NULL:CAPS" title="NULL"><code class="literal">NULL</code></a> if an error occurred. <span class="annotation">[<acronym title="NULL is ok, both for passing and for returning."><span class="acronym">allow-none</span></acronym>]</span>
|
2479
|
-
</td>
|
2480
|
-
</tr>
|
2481
|
-
</tbody>
|
2482
|
-
</table></div>
|
2483
|
-
<p class="since">Since 2.14</p>
|
2484
|
-
</div>
|
2485
|
-
<hr>
|
2486
|
-
<div class="refsect2">
|
2487
|
-
<a name="g-match-info-fetch"></a><h3>g_match_info_fetch ()</h3>
|
2488
|
-
<pre class="programlisting"><a class="link" href="glib-Basic-Types.html#gchar" title="gchar"><span class="returnvalue">gchar</span></a> * g_match_info_fetch (<em class="parameter"><code>const <a class="link" href="glib-Perl-compatible-regular-expressions.html#GMatchInfo" title="GMatchInfo"><span class="type">GMatchInfo</span></a> *match_info</code></em>,
|
2489
|
-
<em class="parameter"><code><a class="link" href="glib-Basic-Types.html#gint" title="gint"><span class="type">gint</span></a> match_num</code></em>);</pre>
|
2490
|
-
<p>
|
2491
|
-
Retrieves the text matching the <em class="parameter"><code>match_num</code></em>'th capturing
|
2492
|
-
parentheses. 0 is the full text of the match, 1 is the first paren
|
2493
|
-
set, 2 the second, and so on.
|
2494
|
-
</p>
|
2495
|
-
<p>
|
2496
|
-
If <em class="parameter"><code>match_num</code></em> is a valid sub pattern but it didn't match anything
|
2497
|
-
(e.g. sub pattern 1, matching "b" against "(a)?b") then an empty
|
2498
|
-
string is returned.
|
2499
|
-
</p>
|
2500
|
-
<p>
|
2501
|
-
If the match was obtained using the DFA algorithm, that is using
|
2502
|
-
<a class="link" href="glib-Perl-compatible-regular-expressions.html#g-regex-match-all" title="g_regex_match_all ()"><code class="function">g_regex_match_all()</code></a> or <a class="link" href="glib-Perl-compatible-regular-expressions.html#g-regex-match-all-full" title="g_regex_match_all_full ()"><code class="function">g_regex_match_all_full()</code></a>, the retrieved
|
2503
|
-
string is not that of a set of parentheses but that of a matched
|
2504
|
-
substring. Substrings are matched in reverse order of length, so
|
2505
|
-
0 is the longest match.
|
2506
|
-
</p>
|
2507
|
-
<p>
|
2508
|
-
The string is fetched from the string passed to the match function,
|
2509
|
-
so you cannot call this function after freeing the string.
|
2510
|
-
</p>
|
2511
|
-
<div class="variablelist"><table border="0">
|
2512
|
-
<col align="left" valign="top">
|
2513
|
-
<tbody>
|
2514
|
-
<tr>
|
2515
|
-
<td><p><span class="term"><em class="parameter"><code>match_info</code></em> :</span></p></td>
|
2516
|
-
<td>
|
2517
|
-
<a class="link" href="glib-Perl-compatible-regular-expressions.html#GMatchInfo" title="GMatchInfo"><span class="type">GMatchInfo</span></a> structure
|
2518
|
-
</td>
|
2519
|
-
</tr>
|
2520
|
-
<tr>
|
2521
|
-
<td><p><span class="term"><em class="parameter"><code>match_num</code></em> :</span></p></td>
|
2522
|
-
<td>number of the sub expression
|
2523
|
-
</td>
|
2524
|
-
</tr>
|
2525
|
-
<tr>
|
2526
|
-
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
|
2527
|
-
<td> The matched substring, or <a class="link" href="glib-Standard-Macros.html#NULL:CAPS" title="NULL"><code class="literal">NULL</code></a> if an error
|
2528
|
-
occurred. You have to free the string yourself. <span class="annotation">[<acronym title="NULL is ok, both for passing and for returning."><span class="acronym">allow-none</span></acronym>]</span>
|
2529
|
-
</td>
|
2530
|
-
</tr>
|
2531
|
-
</tbody>
|
2532
|
-
</table></div>
|
2533
|
-
<p class="since">Since 2.14</p>
|
2534
|
-
</div>
|
2535
|
-
<hr>
|
2536
|
-
<div class="refsect2">
|
2537
|
-
<a name="g-match-info-fetch-pos"></a><h3>g_match_info_fetch_pos ()</h3>
|
2538
|
-
<pre class="programlisting"><a class="link" href="glib-Basic-Types.html#gboolean" title="gboolean"><span class="returnvalue">gboolean</span></a> g_match_info_fetch_pos (<em class="parameter"><code>const <a class="link" href="glib-Perl-compatible-regular-expressions.html#GMatchInfo" title="GMatchInfo"><span class="type">GMatchInfo</span></a> *match_info</code></em>,
|
2539
|
-
<em class="parameter"><code><a class="link" href="glib-Basic-Types.html#gint" title="gint"><span class="type">gint</span></a> match_num</code></em>,
|
2540
|
-
<em class="parameter"><code><a class="link" href="glib-Basic-Types.html#gint" title="gint"><span class="type">gint</span></a> *start_pos</code></em>,
|
2541
|
-
<em class="parameter"><code><a class="link" href="glib-Basic-Types.html#gint" title="gint"><span class="type">gint</span></a> *end_pos</code></em>);</pre>
|
2542
|
-
<p>
|
2543
|
-
Retrieves the position in bytes of the <em class="parameter"><code>match_num</code></em>'th capturing
|
2544
|
-
parentheses. 0 is the full text of the match, 1 is the first
|
2545
|
-
paren set, 2 the second, and so on.
|
2546
|
-
</p>
|
2547
|
-
<p>
|
2548
|
-
If <em class="parameter"><code>match_num</code></em> is a valid sub pattern but it didn't match anything
|
2549
|
-
(e.g. sub pattern 1, matching "b" against "(a)?b") then <em class="parameter"><code>start_pos</code></em>
|
2550
|
-
and <em class="parameter"><code>end_pos</code></em> are set to -1 and <a class="link" href="glib-Standard-Macros.html#TRUE:CAPS" title="TRUE"><code class="literal">TRUE</code></a> is returned.
|
2551
|
-
</p>
|
2552
|
-
<p>
|
2553
|
-
If the match was obtained using the DFA algorithm, that is using
|
2554
|
-
<a class="link" href="glib-Perl-compatible-regular-expressions.html#g-regex-match-all" title="g_regex_match_all ()"><code class="function">g_regex_match_all()</code></a> or <a class="link" href="glib-Perl-compatible-regular-expressions.html#g-regex-match-all-full" title="g_regex_match_all_full ()"><code class="function">g_regex_match_all_full()</code></a>, the retrieved
|
2555
|
-
position is not that of a set of parentheses but that of a matched
|
2556
|
-
substring. Substrings are matched in reverse order of length, so
|
2557
|
-
0 is the longest match.
|
2558
|
-
</p>
|
2559
|
-
<div class="variablelist"><table border="0">
|
2560
|
-
<col align="left" valign="top">
|
2561
|
-
<tbody>
|
2562
|
-
<tr>
|
2563
|
-
<td><p><span class="term"><em class="parameter"><code>match_info</code></em> :</span></p></td>
|
2564
|
-
<td>
|
2565
|
-
<a class="link" href="glib-Perl-compatible-regular-expressions.html#GMatchInfo" title="GMatchInfo"><span class="type">GMatchInfo</span></a> structure
|
2566
|
-
</td>
|
2567
|
-
</tr>
|
2568
|
-
<tr>
|
2569
|
-
<td><p><span class="term"><em class="parameter"><code>match_num</code></em> :</span></p></td>
|
2570
|
-
<td>number of the sub expression
|
2571
|
-
</td>
|
2572
|
-
</tr>
|
2573
|
-
<tr>
|
2574
|
-
<td><p><span class="term"><em class="parameter"><code>start_pos</code></em> :</span></p></td>
|
2575
|
-
<td> pointer to location where to store
|
2576
|
-
the start position, or <a class="link" href="glib-Standard-Macros.html#NULL:CAPS" title="NULL"><code class="literal">NULL</code></a>. <span class="annotation">[<acronym title="Parameter for returning results. Default is transfer full."><span class="acronym">out</span></acronym>][<acronym title="NULL is ok, both for passing and for returning."><span class="acronym">allow-none</span></acronym>]</span>
|
2577
|
-
</td>
|
2578
|
-
</tr>
|
2579
|
-
<tr>
|
2580
|
-
<td><p><span class="term"><em class="parameter"><code>end_pos</code></em> :</span></p></td>
|
2581
|
-
<td> pointer to location where to store
|
2582
|
-
the end position, or <a class="link" href="glib-Standard-Macros.html#NULL:CAPS" title="NULL"><code class="literal">NULL</code></a>. <span class="annotation">[<acronym title="Parameter for returning results. Default is transfer full."><span class="acronym">out</span></acronym>][<acronym title="NULL is ok, both for passing and for returning."><span class="acronym">allow-none</span></acronym>]</span>
|
2583
|
-
</td>
|
2584
|
-
</tr>
|
2585
|
-
<tr>
|
2586
|
-
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
|
2587
|
-
<td> <a class="link" href="glib-Standard-Macros.html#TRUE:CAPS" title="TRUE"><code class="literal">TRUE</code></a> if the position was fetched, <a class="link" href="glib-Standard-Macros.html#FALSE:CAPS" title="FALSE"><code class="literal">FALSE</code></a> otherwise. If
|
2588
|
-
the position cannot be fetched, <em class="parameter"><code>start_pos</code></em> and <em class="parameter"><code>end_pos</code></em> are left
|
2589
|
-
unchanged
|
2590
|
-
|
2591
|
-
</td>
|
2592
|
-
</tr>
|
2593
|
-
</tbody>
|
2594
|
-
</table></div>
|
2595
|
-
<p class="since">Since 2.14</p>
|
2596
|
-
</div>
|
2597
|
-
<hr>
|
2598
|
-
<div class="refsect2">
|
2599
|
-
<a name="g-match-info-fetch-named"></a><h3>g_match_info_fetch_named ()</h3>
|
2600
|
-
<pre class="programlisting"><a class="link" href="glib-Basic-Types.html#gchar" title="gchar"><span class="returnvalue">gchar</span></a> * g_match_info_fetch_named (<em class="parameter"><code>const <a class="link" href="glib-Perl-compatible-regular-expressions.html#GMatchInfo" title="GMatchInfo"><span class="type">GMatchInfo</span></a> *match_info</code></em>,
|
2601
|
-
<em class="parameter"><code>const <a class="link" href="glib-Basic-Types.html#gchar" title="gchar"><span class="type">gchar</span></a> *name</code></em>);</pre>
|
2602
|
-
<p>
|
2603
|
-
Retrieves the text matching the capturing parentheses named <em class="parameter"><code>name</code></em>.
|
2604
|
-
</p>
|
2605
|
-
<p>
|
2606
|
-
If <em class="parameter"><code>name</code></em> is a valid sub pattern name but it didn't match anything
|
2607
|
-
(e.g. sub pattern "X", matching "b" against "(?P<X>a)?b")
|
2608
|
-
then an empty string is returned.
|
2609
|
-
</p>
|
2610
|
-
<p>
|
2611
|
-
The string is fetched from the string passed to the match function,
|
2612
|
-
so you cannot call this function after freeing the string.
|
2613
|
-
</p>
|
2614
|
-
<div class="variablelist"><table border="0">
|
2615
|
-
<col align="left" valign="top">
|
2616
|
-
<tbody>
|
2617
|
-
<tr>
|
2618
|
-
<td><p><span class="term"><em class="parameter"><code>match_info</code></em> :</span></p></td>
|
2619
|
-
<td>
|
2620
|
-
<a class="link" href="glib-Perl-compatible-regular-expressions.html#GMatchInfo" title="GMatchInfo"><span class="type">GMatchInfo</span></a> structure
|
2621
|
-
</td>
|
2622
|
-
</tr>
|
2623
|
-
<tr>
|
2624
|
-
<td><p><span class="term"><em class="parameter"><code>name</code></em> :</span></p></td>
|
2625
|
-
<td>name of the subexpression
|
2626
|
-
</td>
|
2627
|
-
</tr>
|
2628
|
-
<tr>
|
2629
|
-
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
|
2630
|
-
<td> The matched substring, or <a class="link" href="glib-Standard-Macros.html#NULL:CAPS" title="NULL"><code class="literal">NULL</code></a> if an error
|
2631
|
-
occurred. You have to free the string yourself. <span class="annotation">[<acronym title="NULL is ok, both for passing and for returning."><span class="acronym">allow-none</span></acronym>]</span>
|
2632
|
-
</td>
|
2633
|
-
</tr>
|
2634
|
-
</tbody>
|
2635
|
-
</table></div>
|
2636
|
-
<p class="since">Since 2.14</p>
|
2637
|
-
</div>
|
2638
|
-
<hr>
|
2639
|
-
<div class="refsect2">
|
2640
|
-
<a name="g-match-info-fetch-named-pos"></a><h3>g_match_info_fetch_named_pos ()</h3>
|
2641
|
-
<pre class="programlisting"><a class="link" href="glib-Basic-Types.html#gboolean" title="gboolean"><span class="returnvalue">gboolean</span></a> g_match_info_fetch_named_pos (<em class="parameter"><code>const <a class="link" href="glib-Perl-compatible-regular-expressions.html#GMatchInfo" title="GMatchInfo"><span class="type">GMatchInfo</span></a> *match_info</code></em>,
|
2642
|
-
<em class="parameter"><code>const <a class="link" href="glib-Basic-Types.html#gchar" title="gchar"><span class="type">gchar</span></a> *name</code></em>,
|
2643
|
-
<em class="parameter"><code><a class="link" href="glib-Basic-Types.html#gint" title="gint"><span class="type">gint</span></a> *start_pos</code></em>,
|
2644
|
-
<em class="parameter"><code><a class="link" href="glib-Basic-Types.html#gint" title="gint"><span class="type">gint</span></a> *end_pos</code></em>);</pre>
|
2645
|
-
<p>
|
2646
|
-
Retrieves the position in bytes of the capturing parentheses named <em class="parameter"><code>name</code></em>.
|
2647
|
-
</p>
|
2648
|
-
<p>
|
2649
|
-
If <em class="parameter"><code>name</code></em> is a valid sub pattern name but it didn't match anything
|
2650
|
-
(e.g. sub pattern "X", matching "b" against "(?P<X>a)?b")
|
2651
|
-
then <em class="parameter"><code>start_pos</code></em> and <em class="parameter"><code>end_pos</code></em> are set to -1 and <a class="link" href="glib-Standard-Macros.html#TRUE:CAPS" title="TRUE"><code class="literal">TRUE</code></a> is returned.
|
2652
|
-
</p>
|
2653
|
-
<div class="variablelist"><table border="0">
|
2654
|
-
<col align="left" valign="top">
|
2655
|
-
<tbody>
|
2656
|
-
<tr>
|
2657
|
-
<td><p><span class="term"><em class="parameter"><code>match_info</code></em> :</span></p></td>
|
2658
|
-
<td>
|
2659
|
-
<a class="link" href="glib-Perl-compatible-regular-expressions.html#GMatchInfo" title="GMatchInfo"><span class="type">GMatchInfo</span></a> structure
|
2660
|
-
</td>
|
2661
|
-
</tr>
|
2662
|
-
<tr>
|
2663
|
-
<td><p><span class="term"><em class="parameter"><code>name</code></em> :</span></p></td>
|
2664
|
-
<td>name of the subexpression
|
2665
|
-
</td>
|
2666
|
-
</tr>
|
2667
|
-
<tr>
|
2668
|
-
<td><p><span class="term"><em class="parameter"><code>start_pos</code></em> :</span></p></td>
|
2669
|
-
<td> pointer to location where to store
|
2670
|
-
the start position, or <a class="link" href="glib-Standard-Macros.html#NULL:CAPS" title="NULL"><code class="literal">NULL</code></a>. <span class="annotation">[<acronym title="Parameter for returning results. Default is transfer full."><span class="acronym">out</span></acronym>][<acronym title="NULL is ok, both for passing and for returning."><span class="acronym">allow-none</span></acronym>]</span>
|
2671
|
-
</td>
|
2672
|
-
</tr>
|
2673
|
-
<tr>
|
2674
|
-
<td><p><span class="term"><em class="parameter"><code>end_pos</code></em> :</span></p></td>
|
2675
|
-
<td> pointer to location where to store
|
2676
|
-
the end position, or <a class="link" href="glib-Standard-Macros.html#NULL:CAPS" title="NULL"><code class="literal">NULL</code></a>. <span class="annotation">[<acronym title="Parameter for returning results. Default is transfer full."><span class="acronym">out</span></acronym>][<acronym title="NULL is ok, both for passing and for returning."><span class="acronym">allow-none</span></acronym>]</span>
|
2677
|
-
</td>
|
2678
|
-
</tr>
|
2679
|
-
<tr>
|
2680
|
-
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
|
2681
|
-
<td> <a class="link" href="glib-Standard-Macros.html#TRUE:CAPS" title="TRUE"><code class="literal">TRUE</code></a> if the position was fetched, <a class="link" href="glib-Standard-Macros.html#FALSE:CAPS" title="FALSE"><code class="literal">FALSE</code></a> otherwise.
|
2682
|
-
If the position cannot be fetched, <em class="parameter"><code>start_pos</code></em> and <em class="parameter"><code>end_pos</code></em>
|
2683
|
-
are left unchanged.
|
2684
|
-
|
2685
|
-
</td>
|
2686
|
-
</tr>
|
2687
|
-
</tbody>
|
2688
|
-
</table></div>
|
2689
|
-
<p class="since">Since 2.14</p>
|
2690
|
-
</div>
|
2691
|
-
<hr>
|
2692
|
-
<div class="refsect2">
|
2693
|
-
<a name="g-match-info-fetch-all"></a><h3>g_match_info_fetch_all ()</h3>
|
2694
|
-
<pre class="programlisting"><a class="link" href="glib-Basic-Types.html#gchar" title="gchar"><span class="returnvalue">gchar</span></a> ** g_match_info_fetch_all (<em class="parameter"><code>const <a class="link" href="glib-Perl-compatible-regular-expressions.html#GMatchInfo" title="GMatchInfo"><span class="type">GMatchInfo</span></a> *match_info</code></em>);</pre>
|
2695
|
-
<p>
|
2696
|
-
Bundles up pointers to each of the matching substrings from a match
|
2697
|
-
and stores them in an array of gchar pointers. The first element in
|
2698
|
-
the returned array is the match number 0, i.e. the entire matched
|
2699
|
-
text.
|
2700
|
-
</p>
|
2701
|
-
<p>
|
2702
|
-
If a sub pattern didn't match anything (e.g. sub pattern 1, matching
|
2703
|
-
"b" against "(a)?b") then an empty string is inserted.
|
2704
|
-
</p>
|
2705
|
-
<p>
|
2706
|
-
If the last match was obtained using the DFA algorithm, that is using
|
2707
|
-
<a class="link" href="glib-Perl-compatible-regular-expressions.html#g-regex-match-all" title="g_regex_match_all ()"><code class="function">g_regex_match_all()</code></a> or <a class="link" href="glib-Perl-compatible-regular-expressions.html#g-regex-match-all-full" title="g_regex_match_all_full ()"><code class="function">g_regex_match_all_full()</code></a>, the retrieved
|
2708
|
-
strings are not that matched by sets of parentheses but that of the
|
2709
|
-
matched substring. Substrings are matched in reverse order of length,
|
2710
|
-
so the first one is the longest match.
|
2711
|
-
</p>
|
2712
|
-
<p>
|
2713
|
-
The strings are fetched from the string passed to the match function,
|
2714
|
-
so you cannot call this function after freeing the string.
|
2715
|
-
</p>
|
2716
|
-
<div class="variablelist"><table border="0">
|
2717
|
-
<col align="left" valign="top">
|
2718
|
-
<tbody>
|
2719
|
-
<tr>
|
2720
|
-
<td><p><span class="term"><em class="parameter"><code>match_info</code></em> :</span></p></td>
|
2721
|
-
<td>a <a class="link" href="glib-Perl-compatible-regular-expressions.html#GMatchInfo" title="GMatchInfo"><span class="type">GMatchInfo</span></a> structure
|
2722
|
-
</td>
|
2723
|
-
</tr>
|
2724
|
-
<tr>
|
2725
|
-
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
|
2726
|
-
<td> a <a class="link" href="glib-Standard-Macros.html#NULL:CAPS" title="NULL"><code class="literal">NULL</code></a>-terminated array of gchar * pointers.
|
2727
|
-
It must be freed using <a class="link" href="glib-String-Utility-Functions.html#g-strfreev" title="g_strfreev ()"><code class="function">g_strfreev()</code></a>. If the previous match failed
|
2728
|
-
<a class="link" href="glib-Standard-Macros.html#NULL:CAPS" title="NULL"><code class="literal">NULL</code></a> is returned. <span class="annotation">[<acronym title="NULL is ok, both for passing and for returning."><span class="acronym">allow-none</span></acronym>]</span>
|
2729
|
-
</td>
|
2730
|
-
</tr>
|
2731
|
-
</tbody>
|
2732
|
-
</table></div>
|
2733
|
-
<p class="since">Since 2.14</p>
|
2734
|
-
</div>
|
2735
|
-
</div>
|
2736
|
-
<div class="refsect1">
|
2737
|
-
<a name="glib-Perl-compatible-regular-expressions.see-also"></a><h2>See Also</h2>
|
2738
|
-
<a class="xref" href="glib-regex-syntax.html" title="Regular expression syntax"><span class="refentrytitle">Regular expression syntax</span></a>
|
2739
|
-
</div>
|
2740
|
-
</div>
|
2741
|
-
<div class="footer">
|
2742
|
-
<hr>
|
2743
|
-
Generated by GTK-Doc V1.15.1</div>
|
2744
|
-
</body>
|
2745
|
-
</html>
|