<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DZone Snippets: number-lines code</title>
    <link>http://snippets.dzone.com/posts</link>
    <pubDate>Sat, 26 Jul 2008 19:30:14 GMT</pubDate>
    <description>DZone Snippets: number-lines code</description>
    <item>
      <title>number-lines function</title>
      <link>http://snippets.dzone.com/posts/show/1113</link>
      <description>&lt;code&gt;&lt;br /&gt;    number-lines: func [&lt;br /&gt;        "Insert leading line numbers for each line."&lt;br /&gt;        input [string! block!]&lt;br /&gt;        /local lines lead-wd&lt;br /&gt;    ][&lt;br /&gt;        lines: any [all [block? input  input] parse/all input form newline]&lt;br /&gt;        lead-wd: length? form length? lines&lt;br /&gt;        repeat i length? lines [&lt;br /&gt;            insert lines/:i join pad-num i lead-wd ": "&lt;br /&gt;        ]&lt;br /&gt;        either block? input [lines] [rejoin delimit lines newline]&lt;br /&gt;    ]&lt;br /&gt;&lt;/code&gt;</description>
      <pubDate>Tue, 10 Jan 2006 06:01:23 GMT</pubDate>
      <guid>http://snippets.dzone.com/posts/show/1113</guid>
      <author>gregg.irwin (Gregg Irwin)</author>
    </item>
  </channel>
</rss>
