~ubuntu-branches/ubuntu/jaunty/gimp/jaunty-security

« back to all changes in this revision

Viewing changes to plug-ins/script-fu/re/re.scm

  • Committer: Bazaar Package Importer
  • Author(s): Daniel Holbach
  • Date: 2007-05-02 16:33:03 UTC
  • mfrom: (1.1.4 upstream)
  • Revision ID: james.westby@ubuntu.com-20070502163303-bvzhjzbpw8qglc4y
Tags: 2.3.16-1ubuntu1
* Resynchronized with Debian, remaining Ubuntu changes:
  - debian/rules: i18n magic.
* debian/control.in:
  - Maintainer: Ubuntu Core Developers <ubuntu-devel@lists.ubuntu.com>
* debian/patches/02_help-message.patch,
  debian/patches/03_gimp.desktop.in.in.patch,
  debian/patches/10_dont_show_wizard.patch: updated.
* debian/patches/04_composite-signedness.patch,
  debian/patches/05_add-letter-spacing.patch: dropped, used upstream.

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
;; return the substring of STRING matched in MATCH-VECTOR, 
 
2
;; the Nth subexpression match (default 0). 
 
3
(define (re-match-nth string match-vector . n) 
 
4
  (let ((n (if (pair? n) (car n) 0))) 
 
5
    (substring string (car (vector-ref match-vector n)) 
 
6
                    (cdr (vector-ref match-vector n))))) 
 
7
 
 
8
(define (re-before-nth string match-vector . n) 
 
9
  (let ((n (if (pair? n) (car n) 0))) 
 
10
    (substring string 0 (car (vector-ref match-vector n))))) 
 
11
 
 
12
(define (re-after-nth string match-vector . n) 
 
13
  (let ((n (if (pair? n) (car n) 0))) 
 
14
    (substring string (cdr (vector-ref match-vector n)) 
 
15
             (string-length string)))) 
 
 
b'\\ No newline at end of file'