((section 2 "Outdated egg!" (p "This is an egg for CHICKEN 4, the unsupported old release.  You're almost certainly looking for " (int-link "/eggref/5/s" "the CHICKEN 5 version of this egg") ", if it exists.") (p "If it does not exist, there may be equivalent functionality provided by another egg; have a look at the " (link "https://wiki.call-cc.org/chicken-projects/egg-index-5.html" "egg index") ". Otherwise, please consider porting this egg to the current version of CHICKEN.") (tags "egg")) (section 2 "s" (toc) (section 3 "Description" (p "String manipulation egg for chicken scheme.") (p "The " (i "s") " egg aims to provide many convenient procedures for working with strings. Some of these functions are simply wrappers around existing scheme procedures. In the spirit of s.el, such wrappers exist to provide users with a consistent API for quickly and easily manipulating strings in Chicken Scheme without searching documentation across multiple modules.") (p "An attempt has been made to organize procedures according to their categorical behavior. Available procedures are listed by category below, followed by documentation and examples.") (p "Many of the functions defined here were inspired by the Emacs lisp string manipulation library \"s.el\" created by Magnar Sveen (and others) at " (link "https://github.com/magnars/s.el") ".") (ul (li (b "Tweak whitespace") (ul (li "s-trim") (li "s-trim-left") (li "s-trim-right") (li "s-chomp") (li "s-collapse-whitespace") (li "s-center"))) (li (b "To shorter string") (ul (li "s-truncate") (li "s-left") (li "s-right") (li "s-chop-suffix") (li "s-chop-suffixes") (li "s-chop-prefix") (li "s-chop-prefixes") (li "s-shared-start") (li "s-shared-end"))) (li (b "To longer string") (ul (li "s-repeat") (li "s-concat") (li "s-prepend") (li "s-append"))) (li (b "To and from lists") (ul (li "s-lines") (li "s-match") (li "s-match-multiple") (li "s-split") (li "s-join") (li "s-chop"))) (li (b "Predicates") (ul (li "s-equals?") (li "s-matches?") (li "s-blank?") (li "s-ends-with?") (li "s-starts-with?") (li "s-contains?") (li "s-lowercase?") (li "s-uppercase?") (li "s-mixedcase?") (li "s-capitalized?") (li "s-titleized?") (li "s-numeric?"))) (li (b "The misc bucket") (ul (li "s-replace") (li "s-downcase") (li "s-upcase") (li "s-capitalize") (li "s-titleize") (li "s-index-of") (li "s-reverse"))) (li (b "Pertaining to words") (ul (li "s-split-words") (li "s-lower-camel-case") (li "s-upper-camel-case") (li "s-snake-case") (li "s-dashed-words") (li "s-capitalized-words") (li "s-titleized-words") (li "s-unique-words"))))) (section 3 "Author" (p (int-link "/users/Nicholas Van Horn" "Nicholas Van Horn"))) (section 3 "Requirements" (p "The following units are required:") (p (int-link "data-structures") " " (int-link "srfi-1") " " (int-link "srfi-13"))) (section 3 "Repository" (p "The git repository for the s source code is hosted by github: " (link "https://github.com/n3mo/s" "https://github.com/n3mo/s") ".")) (section 3 "Documentation " (section 4 "s-trim" (def (sig (procedure " (s-trim s)" (id s-trim))) (p "Remove whitespace at the beginning and end of " (tt "s") ".") (highlight scheme "(s-trim \"trim \") ;; => \"trim\"\n(s-trim \" this\") ;; => \"this\"\n(s-trim \" only  trims beg and end  \") ;; => \"only  trims beg and end\""))) (section 4 "s-trim-left" (def (sig (procedure " (s-trim-left s)" (id s-trim-left))) (p "Remove whitespace at the beginning of " (tt "s") ".") (highlight scheme "(s-trim-left \"trim \") ;; => \"trim \"\n(s-trim-left \" this\") ;; => \"this\""))) (section 4 "s-trim-right" (def (sig (procedure " (s-trim-right s)" (id s-trim-right))) (p "Remove whitespace at the end of " (tt "s") ".") (highlight scheme "(s-trim-right \"trim \") ;; => \"trim\"\n(s-trim-right \" this\") ;; => \" this\""))) (section 4 "s-chomp" (def (sig (procedure " (s-chomp s)" (id s-chomp))) (p "Remove one trailing " (tt "\\n") ", " (tt "\\r") " or " (tt "\\r\\n") " from " (tt "s") ".") (highlight scheme "(s-chomp \"no newlines\\n\") ;; => \"no newlines\"\n(s-chomp \"no newlines\\r\\n\") ;; => \"no newlines\"\n(s-chomp \"some newlines\\n\\n\") ;; => \"some newlines\\n\""))) (section 4 "s-collapse-whitespace" (def (sig (procedure " (s-collapse-whitespace s)" (id s-collapse-whitespace))) (p "Convert all adjacent whitespace characters in " (tt "s") " to a single space.") (highlight scheme "(s-collapse-whitespace \"only   one space   please\") ;; => \"only one space please\"\n(s-collapse-whitespace \"collapse \\n all \\t sorts of \\r whitespace\") ;; => \"collapse all sorts of whitespace\""))) (section 4 "s-center" (def (sig (procedure " (s-center len s)" (id s-center))) (p "If " (tt "s") " is shorter than " (tt "len") ", pad it with spaces so it is centered.") (highlight scheme "(s-center 5 \"a\") ;; => \"  a  \"\n(s-center 5 \"ab\") ;; => \"  ab \"\n(s-center 1 \"abc\") ;; => \"abc\""))) (section 4 "s-truncate" (def (sig (procedure " (s-truncate len s)" (id s-truncate))) (p "If " (tt "s") " is longer than " (tt "len") ", cut it down and add ... at the end.") (highlight scheme "(s-truncate 6 \"This is too long\") ;; => \"Thi...\"\n(s-truncate 16 \"This is also too long\") ;; => \"This is also ...\"\n(s-truncate 16 \"But this is not!\") ;; => \"But this is not!\""))) (section 4 "s-left" (def (sig (procedure " (s-left len s)" (id s-left))) (p "Returns up to the " (tt "len") " first chars of " (tt "s") ".") (highlight scheme "(s-left 3 \"lib/file.js\") ;; => \"lib\"\n(s-left 3 \"li\") ;; => \"li\""))) (section 4 "s-right" (def (sig (procedure " (s-right len s)" (id s-right))) (p "Returns up to the " (tt "len") " last chars of " (tt "s") ".") (highlight scheme "(s-right 3 \"lib/file.js\") ;; => \".js\"\n(s-right 3 \"li\") ;; => \"li\""))) (section 4 "s-chop-suffix" (def (sig (procedure " (s-chop-suffix suffix s)" (id s-chop-suffix))) (p "Remove " (tt "suffix") " if it is at end of " (tt "s") ".") (highlight scheme "(s-chop-suffix \"-test.js\" \"penguin-test.js\") ;; => \"penguin\"\n(s-chop-suffix \"\\n\" \"no newlines\\n\") ;; => \"no newlines\"\n(s-chop-suffix \"\\n\" \"some newlines\\n\\n\") ;; => \"some newlines\\n\""))) (section 4 "s-chop-suffixes" (def (sig (procedure " (s-chop-suffixes suffixes s)" (id s-chop-suffixes))) (p "Remove " (tt "suffixes") " one by one in order, if they are at the end of " (tt "s") ".") (highlight scheme "(s-chop-suffixes '(\"_test.js\" \"-test.js\" \"Test.js\") \"penguin-test.js\") ;; => \"penguin\"\n(s-chop-suffixes '(\"\\r\" \"\\n\") \"penguin\\r\\n\") ;; => \"penguin\\r\"\n(s-chop-suffixes '(\"\\n\" \"\\r\") \"penguin\\r\\n\") ;; => \"penguin\""))) (section 4 "s-chop-prefix" (def (sig (procedure " (s-chop-prefix prefix s)" (id s-chop-prefix))) (p "Remove " (tt "prefix") " if it is at the start of " (tt "s") ".") (highlight scheme "(s-chop-prefix \"/tmp\" \"/tmp/file.js\") ;; => \"/file.js\"\n(s-chop-prefix \"/tmp\" \"/tmp/tmp/file.js\") ;; => \"/tmp/file.js\""))) (section 4 "s-chop-prefixes" (def (sig (procedure " (s-chop-prefixes prefixes s)" (id s-chop-prefixes))) (p "Remove " (tt "prefixes") " one by one in order, if they are at the start of " (tt "s") ".") (highlight scheme "(s-chop-prefixes '(\"/tmp\" \"/my\") \"/tmp/my/file.js\") ;; => \"/file.js\"\n(s-chop-prefixes '(\"/my\" \"/tmp\") \"/tmp/my/file.js\") ;; => \"/my/file.js\""))) (section 4 "s-shared-start" (def (sig (procedure " (s-shared-start s1 s2)" (id s-shared-start))) (p "Returns the longest prefix " (tt "s1") " and " (tt "s2") " have in common.") (highlight scheme "(s-shared-start \"bar\" \"baz\") ;; => \"ba\"\n(s-shared-start \"foobar\" \"foo\") ;; => \"foo\"\n(s-shared-start \"bar\" \"foo\") ;; => \"\""))) (section 4 "s-shared-end" (def (sig (procedure " (s-shared-end s1 s2)" (id s-shared-end))) (p "Returns the longest suffix " (tt "s1") " and " (tt "s2") " have in common.") (highlight scheme "(s-shared-end \"bar\" \"var\") ;; => \"ar\"\n(s-shared-end \"foo\" \"foo\") ;; => \"foo\"\n(s-shared-end \"bar\" \"foo\") ;; => \"\""))) (section 4 "s-repeat" (def (sig (procedure " (s-repeat num s)" (id s-repeat))) (p "Make a string of " (tt "s") " repeated " (tt "num") " times.") (highlight scheme "(s-repeat 10 \" \") ;; => \"          \"\n(s-concat (s-repeat 8 \"Na\") \" Batman!\") ;; => \"NaNaNaNaNaNaNaNa Batman!\""))) (section 4 "s-concat" (def (sig (procedure " (s-concat s ...)" (id s-concat))) (p "Join all the string arguments into one string.") (highlight scheme "(s-concat \"abc\" \"def\" \"ghi\") ;; => \"abcdefghi\""))) (section 4 "s-prepend" (def (sig (procedure " (s-prepend prefix s)" (id s-prepend))) (p "Concatenate " (tt "prefix") " and " (tt "s") ".") (highlight scheme "(s-prepend \"abc\" \"def\") ;; => \"abcdef\""))) (section 4 "s-append" (def (sig (procedure " (s-append suffix s)" (id s-append))) (p "Concatenate " (tt "s") " and " (tt "suffix") ".") (highlight scheme "(s-append \"abc\" \"def\") ;; => \"defabc\""))) (section 4 "s-lines" (def (sig (procedure " (s-lines s)" (id s-lines))) (p "Splits " (tt "s") " into a list of strings on newline characters.") (highlight scheme "(s-lines \"abc\\ndef\\nghi\") ;; => '(\"abc\" \"def\" \"ghi\")\n(s-lines \"abc\\rdef\\rghi\") ;; => '(\"abc\" \"def\" \"ghi\")\n(s-lines \"abc\\r\\ndef\\r\\nghi\") ;; => '(\"abc\" \"def\" \"ghi\")"))) (section 4 "s-match" (def (sig (procedure " (s-match regexp s)" (id s-match))) (p "When the given expression matches the string, this function returns a list of the whole matching string and a string for each matched subexpression.  If it did not match the returned value is an empty list '().") (highlight scheme "(s-match \"^def\" \"abcdefg\") ;; => '()\n(s-match \"^abc\" \"abcdefg\") ;; => '(\"abc\")\n(s-match \"^.*/([a-z]+).([a-z]+)\" \"/some/weird/file.html\") ;; => '(\"/some/weird/file.html\" \"file\" \"html\")"))) (section 4 "s-match-multiple" (def (sig (procedure " (s-match-multiple regexp s)" (id s-match-multiple))) (p "Returns a list of all matches to " (tt "regexp") " in " (tt "s") ".") (highlight scheme "(s-match-multiple \"[[:digit:]]{4}\" \"Grab (1234) four-digit (4321) numbers (4567)\") ;; => (\"1234\" \"4321\" \"4567\")\n(s-match-multiple \"<.+?>\" \"<html> <body> Some text </body> </html>\") ;; => (\"<html>\" \"<body>\" \"</body>\" \"</html>\")\n(s-match-multiple \"foo-[0-9]{2}\" \"foo-10 foo-11 foo-1 foo-2 foo-100 foo-21\") ;; => (\"foo-10\" \"foo-11\" \"foo-10\" \"foo-21\")"))) (section 4 "s-split" (def (sig (procedure " (s-split separators s [keepempty])" (id s-split))) (p "Splits " (tt "s") " into substrings bounded by matches for " (tt "separators") ". If " (tt "keepempty") " is #t, zero-length substrings are returned.") (highlight scheme "(s-split \" \" \"one  two  three\") ;; => (\"one\" \"two\" \"three\")\n(s-split \":\" \"foo:bar::baz\" #t) ;; => (\"foo\" \"bar\" \"\" \"baz\")\n(s-split \":,\" \"foo:bar:baz,quux,zot\") ;; => (\"foo\" \"bar\" \"baz\" \"quux\" \"zot\")"))) (section 4 "s-join" (def (sig (procedure " (s-join separator strings)" (id s-join))) (p "Join all the strings in " (tt "strings") " with " (tt "separator") " in between.") (highlight scheme "(s-join \"+\" '(\"abc\" \"def\" \"ghi\")) ;; => \"abc+def+ghi\"\n(s-join \"\\n\" '(\"abc\" \"def\" \"ghi\")) ;; => \"abc\\ndef\\nghi\""))) (section 4 "s-chop" (def (sig (procedure " (s-chop len s)" (id s-chop))) (p "Return a list of substrings taken by chopping " (tt "s") " every " (tt "len") " characters.") (highlight scheme "(s-chop 4 \"1234567890\") ;; => (\"1234\" \"5678\" \"90\")\n(s-chop 3 \"i-1i-2i-3i-4i-5\") ;; => (\"i-1\" \"i-2\" \"i-3\" \"i-4\" \"i-5\")"))) (section 4 "s-equals?" (def (sig (procedure " (s-equals? s1 s2)" (id s-equals?))) (p "Is " (tt "s1") " equal to " (tt "s2") "?") (p "This is a simple wrapper around the built-in " (tt "string=") ".") (highlight scheme "(s-equals? \"abc\" \"ABC\") ;; => #f\n(s-equals? \"abc\" \"abc\") ;; => #t"))) (section 4 "s-matches?" (def (sig (procedure " (s-matches? regexp s)" (id s-matches?))) (p "Does " (tt "regexp") " match " (tt "s") "?") (highlight scheme "(s-matches? \"^[0-9]+$\" \"123\") ;; => #t\n(s-matches? \"^[0-9]+$\" \"a123\") ;; => #f"))) (section 4 "s-blank?" (def (sig (procedure " (s-blank? s)" (id s-blank?))) (p "Is " (tt "s") " the empty string?") (highlight scheme "(s-blank? \"\") ;; => #t\n(s-blank? \" \") ;; => #f"))) (section 4 "s-ends-with?" (def (sig (procedure " (s-ends-with? suffix s [ignore-case])" (id s-ends-with?))) (p "Does " (tt "s") " end with " (tt "suffix") "?") (p "If " (tt "ignore-case") " is non-#f, the comparison is done without paying attention to case differences.") (p "Alias: " (tt "s-suffix?")) (highlight scheme "(s-ends-with? \".md\" \"readme.md\") ;; => #t\n(s-ends-with? \".MD\" \"readme.md\") ;; => #f\n(s-ends-with? \".MD\" \"readme.md\" #t) ;; => #t"))) (section 4 "s-starts-with?" (def (sig (procedure " (s-starts-with? prefix s [ignore-case])" (id s-starts-with?))) (p "Does " (tt "s") " start with " (tt "prefix") "?") (p "If " (tt "ignore-case") " is non-#f, the comparison is done without paying attention to case differences.") (highlight scheme "(s-starts-with? \"lib/\" \"lib/file.js\") ;; => #t\n(s-starts-with? \"LIB/\" \"lib/file.js\") ;; => #f\n(s-starts-with? \"LIB/\" \"lib/file.js\" #t) ;; => #t"))) (section 4 "s-contains?" (def (sig (procedure " (s-contains? needle s [ignore-case])" (id s-contains?))) (p "Does " (tt "s") " contain " (tt "needle") "?") (p "If " (tt "ignore-case") " is non-#f, the comparison is done without paying attention to case differences.") (highlight scheme "(s-contains? \"file\" \"lib/file.js\") ;; => #t\n(s-contains? \"nope\" \"lib/file.js\") ;; => #f\n(s-contains? \"^a\" \"it's not ^a regexp\") ;; => #t"))) (section 4 "s-lowercase?" (def (sig (procedure " (s-lowercase? s)" (id s-lowercase?))) (p "Are all the letters in " (tt "s") " in lower case?") (highlight scheme "(s-lowercase? \"file\") ;; => #t\n(s-lowercase? \"File\") ;; => #f\n(s-lowercase? \"123?\") ;; => #t"))) (section 4 "s-uppercase?" (def (sig (procedure " (s-uppercase? s)" (id s-uppercase?))) (p "Are all the letters in " (tt "s") " in upper case?") (highlight scheme "(s-uppercase? \"HULK SMASH\") ;; => #t\n(s-uppercase? \"Bruce no smash\") ;; => #f\n(s-uppercase? \"123?\") ;; => #t"))) (section 4 "s-mixedcase?" (def (sig (procedure " (s-mixedcase? s)" (id s-mixedcase?))) (p "Are there both lower case and upper case letters in " (tt "s") "?") (highlight scheme "(s-mixedcase? \"HULK SMASH\") ;; => #f\n(s-mixedcase? \"Bruce no smash\") ;; => #t\n(s-mixedcase? \"123?\") ;; => #f"))) (section 4 "s-capitalized?" (def (sig (procedure " (s-capitalized? s)" (id s-capitalized?))) (p "In " (tt "s") ", is the first letter upper case, and all other letters lower case?") (highlight scheme "(s-capitalized? \"Capitalized\") ;; => #t\n(s-capitalized? \"I am capitalized\") ;; => #t\n(s-capitalized? \"I Am Titleized\") ;; => #f"))) (section 4 "s-titleized?" (def (sig (procedure " (s-titleized? s)" (id s-titleized?))) (p "In " (tt "s") ", is the first letter of each word upper case, and all other letters lower case?") (highlight scheme "(s-titleized? \"Titleized\") ;; => #t\n(s-titleized? \"I Am Titleized\") ;; => #t\n(s-titleized? \"I am only capitalized\") ;; => #f"))) (section 4 "s-numeric?" (def (sig (procedure " (s-numeric? s)" (id s-numeric?))) (p "Is " (tt "s") " a number?") (highlight scheme "(s-numeric? \"123\") ;; => #t\n(s-numeric? \"onetwothree\") ;; => #f"))) (section 4 "s-replace" (def (sig (procedure " (s-replace old new s)" (id s-replace))) (p "Replaces " (tt "old") " with " (tt "new") " in " (tt "s") ".") (highlight scheme "(s-replace \"file\" \"nope\" \"lib/file.js\") ;; => \"lib/nope.js\"\n(s-replace \"^a\" \"---\" \"it's not ^a regexp\") ;; => \"it's not --- regexp\""))) (section 4 "s-downcase" (def (sig (procedure " (s-downcase s)" (id s-downcase))) (p "Convert " (tt "s") " to lower case.") (p "This is a simple wrapper around  " (tt "string-downcase") ".") (highlight scheme "(s-downcase \"ABC\") ;; => \"abc\""))) (section 4 "s-upcase" (def (sig (procedure " (s-upcase s)" (id s-upcase))) (p "Convert " (tt "s") " to upper case.") (p "This is a simple wrapper around " (tt "string-upcase") ".") (highlight scheme "(s-upcase \"abc\") ;; => \"ABC\""))) (section 4 "s-capitalize" (def (sig (procedure " (s-capitalize s)" (id s-capitalize))) (p "Convert the first word's first character to upper case and the rest to lower case in " (tt "s") ".") (highlight scheme "(s-capitalize \"abc DEF\") ;; => \"Abc def\"\n(s-capitalize \"abc.DEF\") ;; => \"Abc.def\""))) (section 4 "s-titleize" (def (sig (procedure " (s-titleize s)" (id s-titleize))) (p "Convert each word's first character to upper case and the rest to lower case in " (tt "s") ".") (p "This is a simple wrapper around  " (tt "string-titlecase") ".") (highlight scheme "(s-titleize \"abc DEF\") ;; => \"Abc Def\"\n(s-titleize \"abc.DEF\") ;; => \"Abc.Def\""))) (section 4 "s-index-of" (def (sig (procedure " (s-index-of needle s [ignore-case])" (id s-index-of))) (p "Returns first index of " (tt "needle") " in " (tt "s") ", or #f.") (p "If " (tt "ignore-case") " is non-#f, the comparison is done without paying attention to case differences.") (highlight scheme "(s-index-of \"abc\" \"abcdef\") ;; => 0\n(s-index-of \"CDE\" \"abcdef\" #t) ;; => 2\n(s-index-of \"n.t\" \"not a regexp\") ;; => #f"))) (section 4 "s-reverse" (def (sig (procedure " (s-reverse s)" (id s-reverse))) (p "Return the reverse of " (tt "s") ".") (highlight scheme "(s-reverse \"abc\") ;; => \"cba\"\n(s-reverse \"ab xyz\") ;; => \"zyx ba\"\n(s-reverse \"\") ;; => \"\""))) (section 4 "s-split-words" (def (sig (procedure " (s-split-words s)" (id s-split-words))) (p "Split " (tt "s") " into list of words.") (highlight scheme "(s-split-words \"under_score\") ;; => '(\"under\" \"score\")\n(s-split-words \"some-dashed-words\") ;; => '(\"some\" \"dashed\" \"words\")\n(s-split-words \"evenCamelCase\") ;; => '(\"even\" \"Camel\" \"Case\")"))) (section 4 "s-lower-camel-case" (def (sig (procedure " (s-lower-camel-case s)" (id s-lower-camel-case))) (p "Convert " (tt "s") " to lowerCamelCase.") (highlight scheme "(s-lower-camel-case \"some words\") ;; => \"someWords\"\n(s-lower-camel-case \"dashed-words\") ;; => \"dashedWords\"\n(s-lower-camel-case \"under_scored_words\") ;; => \"underScoredWords\""))) (section 4 "s-upper-camel-case" (def (sig (procedure " (s-upper-camel-case s)" (id s-upper-camel-case))) (p "Convert " (tt "s") " to UpperCamelCase.") (highlight scheme "(s-upper-camel-case \"some words\") ;; => \"SomeWords\"\n(s-upper-camel-case \"dashed-words\") ;; => \"DashedWords\"\n(s-upper-camel-case \"under_scored_words\") ;; => \"UnderScoredWords\""))) (section 4 "s-snake-case" (def (sig (procedure " (s-snake-case s)" (id s-snake-case))) (p "Convert " (tt "s") " to snake_case.") (highlight scheme "(s-snake-case \"some words\") ;; => \"some_words\"\n(s-snake-case \"dashed-words\") ;; => \"dashed_words\"\n(s-snake-case \"camelCasedWords\") ;; => \"camel_cased_words\""))) (section 4 "s-dashed-words" (def (sig (procedure " (s-dashed-words s)" (id s-dashed-words))) (p "Convert " (tt "s") " to dashed-words.") (highlight scheme "(s-dashed-words \"some words\") ;; => \"some-words\"\n(s-dashed-words \"under_scored_words\") ;; => \"under-scored-words\"\n(s-dashed-words \"camelCasedWords\") ;; => \"camel-cased-words\""))) (section 4 "s-capitalized-words" (def (sig (procedure " (s-capitalized-words s)" (id s-capitalized-words))) (p "Convert " (tt "s") " to Capitalized Words.") (highlight scheme "(s-capitalized-words \"some words\") ;; => \"Some words\"\n(s-capitalized-words \"under_scored_words\") ;; => \"Under scored words\"\n(s-capitalized-words \"camelCasedWords\") ;; => \"Camel cased words\""))) (section 4 "s-titleized-words" (def (sig (procedure " (s-titleized-words s)" (id s-titleized-words))) (p "Convert " (tt "s") " to Titleized Words.") (highlight scheme "(s-titleized-words \"some words\") ;; => \"Some Words\"\n(s-titleized-words \"under_scored_words\") ;; => \"Under Scored Words\"\n(s-titleized-words \"camelCasedWords\") ;; => \"Camel Cased Words\""))) (section 4 "s-unique-words" (def (sig (procedure " (s-unique-words s)" (id s-unique-words))) (p "Return list of unique words in " (tt "s") ".") (highlight scheme "(s-unique-words \"Forget redundancy about about redundancy\") ;; => (\"Forget\" \"about\" \"redundancy\")\n(s-unique-words \"unique-dashed-words-dashed-words-too\") ;; => (\"unique\" \"dashed\" \"words\" \"too\")\n(s-unique-words \"camelCase_words and_and underscore_words_too\") ;; => (\"camel\" \"Case\" \"and\" \"underscore\" \"words\" \"too\")")))) (section 3 "Examples" (p "Multiple examples for each procedure are given above.")) (section 3 "Changelog" (ul (li "1.0 Initial release"))) (section 3 "License" (p "Copyright (C) 2013 Nicholas M. Van Horn") (p "Original Elisp Library Copyright (C) 2012 Magnar Sveen") (p "Author: Nicholas M. Van Horn Keywords: chicken, scheme, string") (p "This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.") (p "This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License for more details.") (p "You should have received a copy of the GNU General Public License along with this program.  If not, see " (link "http://www.gnu.org/licenses/") ". s.el thisonly   one space   please") (pre " ab  ) ;; =") (p "Returns up to the " (tt "len") " first chars of " (tt "s") ".") (p "/procedure (s-chop-suffix (s-chop-suffixes '(/tmp/procedure/tmp/my/file.jsbar (s-shared-end s1 s2)foo) ;; =") (section 4 "s-append" (pre "(s-lines s)abc /procedure) ;; =   Some text body enscript highlight= i-1") (p "(s-equals? scheme.md/procedure) ;; =enscript highlight= fileHULK SMASHHULK SMASH/enscript/enscript (s-titleized? (s-numeric? nope  (s-downcase s)) ;; = enscript highlight=) (s-split-words /enscriptsome words (s-lower-camel-case SomeWords")) (section 4 "s-dashed-words" (p "/procedureCamel cased wordsscheme")) (section 4 "s-unique-words" (p ") ;; =underscore/enscript")))))