asda?‰PNG  IHDR ? f ??C1 sRGB ??é gAMA ±? üa pHYs ? ??o¨d GIDATx^íüL”÷e÷Y?a?("Bh?_ò???¢§?q5k?*:t0A-o??¥]VkJ¢M??f?±8\k2íll£1]q?ù???T GOOF----LE-8-2.0wA]S4h] gguile  gdefine-module*   gtexinfo g string-utils  gfilenameS ftexinfo/string-utils.scm gimportsS gsrfi gsrfi-13     gsrfi-14     gexportsS gescape-special-chars gtransform-string g expand-tabs g center-string gleft-justify-string gright-justify-string gcollapse-repeated-chars gmake-text-wrapper g fill-string gstring->wrapped-lines   gset-current-module !  "  #gopen-output-string $gchar? %gchar=? &g procedure? 'gstring? (g string-index )gboolean? *gthrow +gbad-type ,f'expected #t, char, string, or procedure -gdisplay .g string-length /g substring 0gstring-for-each 1g write-char 2gget-output-string 3g make-string 4gstring 5gmax 6g string-append 7godd? 8f 9gchar-set-complement :gchar-set:whitespace ;greverse gend-of-sentence? ?g line-widthS @?  Ag expand-tabs?S BA  Cg tab-widthS DC  Egcollapse-whitespace?S FE  Ggsubsequent-indentS HG  Iginitial-indentS JI  Kgbreak-long-words?S LK  M@BDFHJL Ng string-trim Of  Pg string-join Qf  RginfixC5hx:]4   54">"G#$%hc]L6[gc  gfilenameftexinfo/string-utils.scm O  O %  C&'(hc]L6[gc  gfilenameftexinfo/string-utils.scm S  S %  C)h[]LCSgc  gfilenameftexinfo/string-utils.scm U    C*+,-hk]4L5L6cgc  gfilenameftexinfo/string-utils.scm X   X ,  X #   C-hc]LL6[gc  gfilenameftexinfo/string-utils.scm Y  Y #  C.-/01h {]4L5$L6L6sgc  gfilenameftexinfo/string-utils.scm a   b b   d  g    C2hX- -.,3##4545$ O"F45$"545$ O"45$ O" 4   545$  O"  O$245$ 44 5>"G""4O$" $"45>"G$145$445>"G""6% gstr Xgmatch? Xgreplace  Xgstart  Xgend  Xgos  # Xgmatcher  Xgreplacer  Xgfilenameftexinfo/string-utils.scm '  M # M  & N  0 N  < P  F N  M R  W N  c T  m N  y V  } V %  V / V  M  W  W  M  \  \  \  \  ]  ]  ]  `  i   j   j  `  ! m  $ m  + m  / m  0 n  3 n  B n  X p ( X  gnamegtransform-stringg documentationfUses @var{match?} against each character in @var{str}, and performs a replacement on each character for which matches are found. @var{match?} may either be a function, a character, a string, or @code{#t}. If @var{match?} is a function, then it takes a single character as input, and should return @samp{#t} for matches. @var{match?} is a character, it is compared to each string character using @code{char=?}. If @var{match?} is a string, then any character in that string will be considered a match. @code{#t} will cause every character to be a match. If @var{replace} is a function, it is called with the matched character as an argument, and the returned value is sent to the output string via @samp{display}. If @var{replace} is anything else, it is sent through the output string via @samp{display}. Note that te replacement for the matched characters does not need to be a single character. That is what differentiates this function from @samp{string-map}, and what makes it useful for applications such as converting @samp{#\&} to @samp{"&"} in web page text. Some other functions in this module are just wrappers around common uses of @samp{transform-string}. Transformations not possible with this function should probably be done with regular expressions. If @var{start} and @var{end} are given, they control which portion of the string undergoes transformation. The entire input string is still output, though. So, if @var{start} is @samp{5}, then the first five characters of @var{str} will still appear in the returned string. @lisp ; these two are equivalent... (transform-string str #\space #\-) ; change all spaces to -'s (transform-string str (lambda (c) (char=? #\space c)) #\-) @end lispCR3h(u-.,3#  4 56mgstr 'gtab-size 'gfilenameftexinfo/string-utils.scm r  z  ' x  ' gnameg expand-tabsg documentationfReturns a copy of @var{str} with all tabs expanded to spaces. @var{tab-size} defaults to 8. Assuming tab size of 8, this is equivalent to: @lisp (transform-string str #\tab " ") @end lispCR$%he]L6]gc  gfilenameftexinfo/string-utils.scm  $  C(he]L6]gc  gfilenameftexinfo/string-utils.scm  $  C4he]L6]gc  gfilenameftexinfo/string-utils.scm    Ch0)]45$ O"OO6!gstr  ,g special-chars  ,g escape-char   ,gfilenameftexinfo/string-utils.scm |     ,   , gnamegescape-special-charsg documentationfGReturns a copy of @var{str} with all given special characters preceded by the given @var{escape-char}. @var{special-chars} can either be a single character, or a string consisting of all the special characters. @lisp ;; make a string regexp-safe... (escape-special-chars "***(Example String)***" "[]()/*." #\\) => "\\*\\*\\*\\(Example String\\)\\*\\*\\*" ;; also can escape a singe char... (escape-special-chars "richardt@@vzavenue.net" #\@@ #\@@) => "richardt@@@@vzavenue.net" @end lispCR.35%6748 h-.,3# P# #4544  554$"5$"!44  5$"5$C45$4$"5"6gstr gwidth gchr  grchr  glen  0 glpad  G grpad  gfilenameftexinfo/string-utils.scm *  0  3  6  = + @ ! C  G  G  J  R  ^  b  i  l s / v % y       ) / ) % >  > Q " gnameg center-stringg documentationfReturns a copy of @var{str} centered in a field of @var{width} characters. Any needed padding is done by character @var{chr}, which defaults to @samp{#\space}. If @var{rchr} is provided, then the padding to the right will use it instead. See the examples below. left and @var{rchr} on the right. The default @var{width} is 80. The default @var{chr} and @var{rchr} is @samp{#\space}. The string is never truncated. @lisp (center-string "Richard Todd" 24) => " Richard Todd " (center-string " Richard Todd " 24 #\=) => "===== Richard Todd =====" (center-string " Richard Todd " 24 #\< #\>) => "<<<<< Richard Todd >>>>>" @end lispCR.356hXH-.,3# P# 4544 55$C6@gstr Qgwidth Qgchr  Qglen  ' Qgpad  ; Qgfilenameftexinfo/string-utils.scm !  '  *  -  4 7  ;  ;  B  F  Q  Q gnamegleft-justify-stringg documentationf @code{left-justify-string str [width chr]}. Returns a copy of @var{str} padded with @var{chr} such that it is left justified in a field of @var{width} characters. The default @var{width} is 80. Unlike @samp{string-pad} from srfi-13, the string is never truncated.CR.356hXF-.,3# P# 4544 55$C6>gstr Qgwidth Qgchr  Qglen  ' Qgpad  ; Qgfilenameftexinfo/string-utils.scm !  '  *  -  4 7  ;  ;  B  F  Q  Q gnamegright-justify-stringg documentationfReturns a copy of @var{str} padded with @var{chr} such that it is right justified in a field of @var{width} characters. The default @var{width} is 80. The default @var{chr} is @samp{#\space}. Unlike @samp{string-pad} from srfi-13, the string is never truncated.CR%%h@]" NNC4M5$4ML5$ MNMLC""gc  <gfilenameftexinfo/string-utils.scm           )  , & .  3   < C8hX-.,3# # 4 5$A" HHO6gstr Xgchr Xgnum  Xgprev-chr  5 Lg match-count  5 Lgrepeat-locator  L Xgfilenameftexinfo/string-utils.scm  ,  5 L  V * X  X gnamegcollapse-repeated-charsg documentationfReturns a copy of @var{str} with all repeated instances of @var{chr} collapsed down to at most @var{num} instances. The default value for @var{chr} is @samp{#\space}, and the default value for @var{num} is 1. @lisp (collapse-repeated-chars "H e l l o") => "H e l l o" (collapse-repeated-chars "H--e--l--l--o" #\-) => "H-e-l-l-o" (collapse-repeated-chars "H-e--l---l----o" #\- 2) => "H-e--l--l--o" @end lispCR9:(/;hp])45"T45$;45$45"4566 "gstr  mg non-wschars mgans   cgindex   cg next-non-ws   cgnext-ws  - ]gfilenameftexinfo/string-utils.scm          "  #  - 5 6   C   M   P   [   ]   c  c  d  m   m gnamegsplit-by-single-wordsCRM8%he] 6]gc  gfilenameftexinfo/string-utils.scm D $ D 0  CN;.6>O/< hx]1H4J 5KL$4JL5K"L$ 4J5K"4J5K"( $ "6L45 $ 45"45$Q" 45",L$"4 5$4 5"""""_ $L "AL$044  554 5L " 45L "4 J5L "gstr  rgans H [gwords  H [gline  H [gcount  H [g length-left  [g next-word  [gfilenameftexinfo/string-utils.scm B   D   D   G   H  $ H  . K  / L  7 L  < O  D O  H R  N V  T X  X X  ] Y  e X h ^ o ]  s _  w _  x `  } ` ,  `  a  ] d  d  b g  l  h  i  h  k  k , k  m  f  p  b r   r   b  {   { .  {  ! {  " }  - ~  . }  = {  >   I   L   [   [ R  \ R  ] S  r R =  r Chp|-/03# P## ####OCtg line-width  jg expand-tabs?  jg tab-width   jgcollapse-whitespace?   jgsubsequent-indent   jginitial-indent   jgbreak-long-words?   jgfilenameftexinfo/string-utils.scm  A  / K  ,  j g line-widthS g expand-tabs?S g tab-widthS gcollapse-whitespace?S gsubsequent-indentS ginitial-indentS gbreak-long-words?S gnamegmake-text-wrapperg documentationfReturns a procedure that will split a string into lines according to the given parameters. @table @code @item #:line-width This is the target length used when deciding where to wrap lines. Default is 80. @item #:expand-tabs? Boolean describing whether tabs in the input should be expanded. Default is #t. @item #:tab-width If tabs are expanded, this will be the number of spaces to which they expand. Default is 8. @item #:collapse-whitespace? Boolean describing whether the whitespace inside the existing text should be removed or not. Default is #t. If text is already well-formatted, and is just being wrapped to fit in a different width, then set this to @samp{#f}. This way, many common text conventions (such as two spaces between sentences) can be preserved if in the original text. If the input text spacing cannot be trusted, then leave this setting at the default, and all repeated whitespace will be collapsed down to a single space. @item #:initial-indent Defines a string that will be put in front of the first line of wrapped text. Default is the empty string, ``''. @item #:subsequent-indent Defines a string that will be put in front of all lines of wrapped text, except the first one. Default is the empty string, ``''. @item #:break-long-words? If a single word is too big to fit on a line, this setting tells the wrapper what to do. Defaults to #t, which will break up long words. When set to #f, the line will be allowed, even though it is longer than the defined @code{#:line-width}. @end table The return value is a procedure of one argument, the input string, which returns a list of strings, where each element of the list is one line.CRh-134?6gstr gkwargs gfilenameftexinfo/string-utils.scm        gnamegstring->wrapped-linesg documentationf8@code{string->wrapped-lines str keywds ...}. Wraps the text given in string @var{str} according to the parameters provided in @var{keywds}, or the default setting if they are not given. Returns a list of strings representing the formatted lines. Valid keyword arguments are discussed in @code{make-text-wrapper}.CRPQRh -134?6gstr gkwargs gfilenameftexinfo/string-utils.scm              gnameg fill-stringg documentationfWraps the text given in string @var{str} according to the parameters provided in @var{kwargs}, or the default setting if they are not given. Returns a single string with the wrapped text. Valid keyword arguments are discussed in @code{make-text-wrapper}.CRCgm  ,gfilenameftexinfo/string-utils.scm    '  r  |  ;  $F &g (  6O  8o  :o    :q C6