;ELC ;;; Compiled ;;; in Emacs version 28.0.50 ;;; with all optimizations. (autoload 'slot-value "eieio") #@42 Remove whitespace at the beginning of S. (defalias 's-trim-left #[(s) "\302 \303\216\304\305 \"\203\306\307\310\211 $\202 *\207" [save-match-data-internal s match-data #[nil "\301\302\"\207" [save-match-data-internal set-match-data evaporate] 3] string-match "\\`[ \n ]+" replace-match "" t] 5 (#$ . 118)]) (byte-code "\300\301\302\303#\300\301\304\303#\300\207" [function-put s-trim-left pure t side-effect-free] 5) #@36 Remove whitespace at the end of S. (defalias 's-trim-right #[(s) "\302 \303\216\304\305 \"\203\306\307\310\211 $\202 *\207" [save-match-data-internal s match-data #[nil "\301\302\"\207" [save-match-data-internal set-match-data evaporate] 3] string-match "[ \n ]+\\'" replace-match "" t] 5 (#$ . 548)]) #@50 Remove whitespace at the beginning and end of S. (defalias 's-trim #[(s) "\301\302!!\207" [s s-trim-left s-trim-right] 3 (#$ . 863)]) (byte-code "\300\301\302\303#\300\301\304\303#\300\207" [function-put s-trim pure t side-effect-free] 5) #@63 Convert all adjacent whitespace characters to a single space. (defalias 's-collapse-whitespace #[(s) "\301\302\303#\207" [s replace-regexp-in-string "[ \n ]+" " "] 4 (#$ . 1109)]) (byte-code "\300\301\302\303#\300\301\304\303#\300\207" [function-put s-collapse-whitespace pure t side-effect-free] 5) #@190 Split S into substrings bounded by matches for regexp SEPARATOR. If OMIT-NULLS is non-nil, zero-length substrings are omitted. This is a simple wrapper around the built-in `split-string'. (defalias 's-split #[(separator s &optional omit-nulls) "\304 \305\216\306 \n #*\207" [save-match-data-internal s separator omit-nulls match-data #[nil "\301\302\"\207" [save-match-data-internal set-match-data evaporate] 3] split-string] 4 (#$ . 1418)]) (byte-code "\300\301\302\303#\300\207" [function-put s-split side-effect-free t] 4) #@164 Split S up to N times into substrings bounded by matches for regexp SEPARATOR. If OMIT-NULLS is non-nil, zero-length substrings are omitted. See also `s-split'. (defalias 's-split-up-to #[(separator s n &optional omit-nulls) "\306 \307\216\310\311\312\313\314\"r q\210\315\216\fc\210eb\316 \311\314#\203M\310W\203M\n\310\224{\203;\317\232\204@ B)\310\225bS\202\nd{\203^\317\232\204c B, \237,\207" [save-match-data-internal r op #1=#:temp-buffer s separator match-data #[nil "\301\302\"\207" [save-match-data-internal set-match-data evaporate] 3] 0 nil generate-new-buffer " *temp*" t #[nil "\301!\205 \302!\207" [#1# buffer-name kill-buffer] 2] re-search-forward "" n sub omit-nulls] 4 (#$ . 1954)]) (byte-code "\300\301\302\303#\300\207" [function-put s-split-up-to side-effect-free t] 4) #@56 Splits S into a list of strings on newline characters. (defalias 's-lines #[(s) "\301\302\"\207" [s s-split "\\( \n\\|[\n ]\\)"] 3 (#$ . 2794)]) (byte-code "\300\301\302\303#\300\301\304\303#\300\207" [function-put s-lines pure t side-effect-free] 5) #@60 Join all the strings in STRINGS with SEPARATOR in between. (defalias 's-join #[(separator strings) "\302\303 #\207" [strings separator mapconcat identity] 4 (#$ . 3052)]) (byte-code "\300\301\302\303#\300\301\304\303#\300\207" [function-put s-join pure t side-effect-free] 5) #@48 Join all the string arguments into one string. (defalias 's-concat #[(&rest strings) "\301\302\"\207" [strings apply concat] 3 (#$ . 3335)]) (byte-code "\300\301\302\303#\300\301\304\303#\300\207" [function-put s-concat pure t side-effect-free] 5) #@27 Concatenate PREFIX and S. (defalias 's-prepend #[(prefix s) " P\207" [prefix s] 2 (#$ . 3590)]) (byte-code "\300\301\302\303#\300\301\304\303#\300\207" [function-put s-prepend pure t side-effect-free] 5) #@27 Concatenate S and SUFFIX. (defalias 's-append #[(suffix s) " P\207" [s suffix] 2 (#$ . 3801)]) (byte-code "\300\301\302\303#\300\301\304\303#\300\207" [function-put s-append pure t side-effect-free] 5) #@40 Make a string of S repeated NUM times. (defalias 's-repeat #[(num s) "\303 \304V\203\nB S\211\202\305\306\")\207" [ss num s nil 0 apply concat] 4 (#$ . 4010)]) (byte-code "\300\301\302\303#\300\301\304\303#\300\207" [function-put s-repeat pure t side-effect-free] 5) #@37 Remove SUFFIX if it is at end of S. (defalias 's-chop-suffix #[(suffix s) "G[\nGGY\203\n \303O\230\203\n\304 O\202\n)\207" [suffix pos s nil 0] 4 (#$ . 4292)]) (byte-code "\300\301\302\303#\300\301\304\303#\300\207" [function-put s-chop-suffix pure t side-effect-free] 5) #@67 Remove SUFFIXES one by one in order, if they are at the end of S. (defalias 's-chop-suffixes #[(suffixes s) "\203\302@ \"A\211\204 \207" [suffixes s s-chop-suffix] 4 (#$ . 4580)]) (byte-code "\300\301\302\303#\300\301\304\303#\300\207" [function-put s-chop-suffixes pure t side-effect-free] 5) #@43 Remove PREFIX if it is at the start of S. (defalias 's-chop-prefix #[(prefix s) "G\nGGY\203\n\303 O\230\203\n \304O\202\n)\207" [prefix pos s 0 nil] 4 (#$ . 4889)]) (byte-code "\300\301\302\303#\300\301\304\303#\300\207" [function-put s-chop-prefix pure t side-effect-free] 5) #@69 Remove PREFIXES one by one in order, if they are at the start of S. (defalias 's-chop-prefixes #[(prefixes s) "\203\302@ \"A\211\204 \207" [prefixes s s-chop-prefix] 4 (#$ . 5182)]) (byte-code "\300\301\302\303#\300\301\304\303#\300\207" [function-put s-chop-prefixes pure t side-effect-free] 5) #@54 Returns the longest prefix S1 and S2 have in common. (defalias 's-shared-start #[(s1 s2) "\303\304G \304 G&\211\305=\203\202\304\306\n!SO)\207" [s1 s2 cmp compare-strings 0 t abs] 8 (#$ . 5493)]) (byte-code "\300\301\302\303#\300\301\304\303#\300\207" [function-put s-shared-start pure t side-effect-free] 5) #@54 Returns the longest suffix S1 and S2 have in common. (defalias 's-shared-end #[(s1 s2) "G\nG ^\306\211\fW\203) ZSH\n ZSHU\203) T\211\202 \306U\2033\307\2028 [\310O,\207" [s1 l1 s2 l2 search-length i 0 "" nil] 5 (#$ . 5818)]) (byte-code "\300\301\302\303#\300\301\304\303#\300\207" [function-put s-shared-end pure t side-effect-free] 5) #@50 Remove one trailing `\n`, `\r` or `\r\n` from S. (defalias 's-chomp #[(s) "\301\302\"\207" [s s-chop-suffixes ("\n" " ")] 3 (#$ . 6177)]) (byte-code "\300\301\302\303#\300\301\304\303#\300\207" [function-put s-chomp pure t side-effect-free] 5) #@192 If S is longer than LEN, cut it down and add ELLIPSIS to the end. The resulting string, including ellipsis, will be LEN characters long. When not specified, ELLIPSIS defaults to ‘...’. (defalias 's-truncate #[(len s &optional ellipsis) "\204\303 G\nV\203\304\305 \306\nGZO#\207 \207" [ellipsis s len "..." format "%s%s" 0] 6 (#$ . 6429)]) (byte-code "\300\301\302\303#\300\301\304\303#\300\207" [function-put s-truncate pure t side-effect-free] 5) #@56 If S is longer than LEN, wrap the words with newlines. (defalias 's-word-wrap #[(len s) "\305 \306\216\307\310\311\"r q\210\312\216\nc\210 \313ed\"\210)ed{-\207" [save-match-data-internal #1=#:temp-buffer s len fill-column match-data #[nil "\301\302\"\207" [save-match-data-internal set-match-data evaporate] 3] generate-new-buffer " *temp*" t #[nil "\301!\205 \302!\207" [#1# buffer-name kill-buffer] 2] fill-region] 3 (#$ . 6897)]) (byte-code "\300\301\302\303#\300\207" [function-put s-word-wrap side-effect-free t] 4) #@65 If S is shorter than LEN, pad it with spaces so it is centered. (defalias 's-center #[(len s) "\303 GZ]\304\305\n\306\"\307\" \304\310\n\306\"\307\"Q)\207" [len s extra 0 make-string ceiling 2 32 floor] 6 (#$ . 7432)]) (byte-code "\300\301\302\303#\300\301\304\303#\300\207" [function-put s-center pure t side-effect-free] 5) #@60 If S is shorter than LEN, pad it with PADDING on the left. (defalias 's-pad-left #[(len padding s) "\304 GZ]\305\n\306 !\" P)\207" [len s extra padding 0 make-string string-to-char] 4 (#$ . 7766)]) (byte-code "\300\301\302\303#\300\301\304\303#\300\207" [function-put s-pad-left pure t side-effect-free] 5) #@61 If S is shorter than LEN, pad it with PADDING on the right. (defalias 's-pad-right #[(len padding s) "\304 GZ] \305\n\306 !\"P)\207" [len s extra padding 0 make-string string-to-char] 5 (#$ . 8081)]) (byte-code "\300\301\302\303#\300\301\304\303#\300\207" [function-put s-pad-right pure t side-effect-free] 5) #@41 Returns up to the LEN first chars of S. (defalias 's-left #[(len s) "G V\203\f\302 O\207\207" [s len 0] 3 (#$ . 8399)]) (byte-code "\300\301\302\303#\300\301\304\303#\300\207" [function-put s-left pure t side-effect-free] 5) #@40 Returns up to the LEN last chars of S. (defalias 's-right #[(len s) "G\211\nV\203 \nZ O\202)\207" [s l len] 4 (#$ . 8634)]) (byte-code "\300\301\302\303#\300\301\304\303#\300\207" [function-put s-right pure t side-effect-free] 5) #@142 Does S end with SUFFIX? If IGNORE-CASE is non-nil, the comparison is done without paying attention to case differences. Alias: `s-suffix?' (defalias 's-ends-with\? #[(suffix s &optional ignore-case) "G GZ\211\304Y\205\305 \306\211\n\306 &\307=)\207" [s suffix start-pos ignore-case 0 compare-strings nil t] 9 (#$ . 8879)]) (byte-code "\300\301\302\303#\300\301\304\303#\300\207" [function-put s-ends-with\? pure t side-effect-free] 5) #@209 Does S start with PREFIX? If IGNORE-CASE is non-nil, the comparison is done without paying attention to case differences. Alias: `s-prefix?'. This is a simple wrapper around the built-in `string-prefix-p'. (defalias 's-starts-with\? #[(prefix s &optional ignore-case) "\303 \n#\207" [prefix s ignore-case string-prefix-p] 4 (#$ . 9329)]) (byte-code "\300\301\302\303#\300\301\304\303#\300\207" [function-put s-starts-with\? pure t side-effect-free] 5) (defalias 's--truthy\? #[(val) "??\207" [val] 1]) (byte-code "\300\301\302\303#\300\301\304\303#\300\207" [function-put s--truthy\? pure t side-effect-free] 5) #@121 Does S contain NEEDLE? If IGNORE-CASE is non-nil, the comparison is done without paying attention to case differences. (defalias 's-contains\? #[(needle s &optional ignore-case) "\305\306\n! \307\310\311#)\266\203!)\207" [ignore-case case-fold-search needle s inhibit-changing-match-data s--truthy\? regexp-quote nil t string-match] 8 (#$ . 9952)]) (byte-code "\300\301\302\303#\300\301\304\303#\300\207" [function-put s-contains\? pure t side-effect-free] 5) #@82 Is S1 equal to S2? This is a simple wrapper around the built-in `string-equal'. (defalias 's-equals\? #[(s1 s2) " \230\207" [s1 s2] 2 (#$ . 10425)]) (byte-code "\300\301\302\303#\300\301\304\303#\300\207" [function-put s-equals\? pure t side-effect-free] 5) #@83 Is S1 less than S2? This is a simple wrapper around the built-in `string-lessp'. (defalias 's-less\? #[(s1 s2) " \231\207" [s1 s2] 2 (#$ . 10691)]) (byte-code "\300\301\302\303#\300\301\304\303#\300\207" [function-put s-less\? pure t side-effect-free] 5) #@139 Does REGEXP match S? If START is non-nil the search starts at that index. This is a simple wrapper around the built-in `string-match-p'. (defalias 's-matches\? #[(regexp s &optional start) "\304 \n\305\306#)\266\203!\207" [regexp s start inhibit-changing-match-data s--truthy\? t string-match] 8 (#$ . 10955)]) (byte-code "\300\301\302\303#\300\207" [function-put s-matches\? side-effect-free t] 4) #@31 Is S nil or the empty string? (defalias 's-blank\? #[(s) "?\206\301\230\207" [s ""] 2 (#$ . 11366)]) (byte-code "\300\301\302\303#\300\301\304\303#\300\207" [function-put s-blank\? pure t side-effect-free] 5) #@66 Is S nil or the empty string or string only contains whitespace? (defalias 's-blank-str\? #[(s) "\301!\206 \301\302!!\207" [s s-blank\? s-trim] 3 (#$ . 11585)]) (byte-code "\300\301\302\303#\300\301\304\303#\300\207" [function-put s-blank-str\? pure t side-effect-free] 5) #@44 Is S anything but nil or the empty string? (defalias 's-present\? #[(s) "\301!?\207" [s s-blank\?] 2 (#$ . 11867)]) (byte-code "\300\301\302\303#\300\301\304\303#\300\207" [function-put s-present\? pure t side-effect-free] 5) #@54 Return S if it's `s-present?', otherwise return nil. (defalias 's-presence #[(s) "\301!\205\207" [s s-present\?] 2 (#$ . 12100)]) (byte-code "\300\301\302\303#\300\301\304\303#\300\207" [function-put s-presence pure t side-effect-free] 5) #@41 Are all the letters in S in lower case? (defalias 's-lowercase\? #[(s) "\303\304 \303\305\306#)\266\203)?\207" [case-fold-search s inhibit-changing-match-data nil "[[:upper:]]" t string-match] 7 (#$ . 12349)]) (byte-code "\300\301\302\303#\300\207" [function-put s-lowercase\? side-effect-free t] 4) #@41 Are all the letters in S in upper case? (defalias 's-uppercase\? #[(s) "\303\304 \303\305\306#)\266\203)?\207" [case-fold-search s inhibit-changing-match-data nil "[[:lower:]]" t string-match] 7 (#$ . 12660)]) (byte-code "\300\301\302\303#\300\207" [function-put s-uppercase\? side-effect-free t] 4) #@56 Are there both lower case and upper case letters in S? (defalias 's-mixedcase\? #[(s) "\303\304\305 \303\306\307#)\266\203\205 \310 \303\306\307#)\266\203!)\207" [case-fold-search s inhibit-changing-match-data nil s--truthy\? "[[:lower:]]" t string-match "[[:upper:]]"] 8 (#$ . 12971)]) #@73 In S, is the first letter upper case, and all other letters lower case? (defalias 's-capitalized\? #[(s) "\303\304\305 \303\306\307#)\266\203!)\207" [case-fold-search s inhibit-changing-match-data nil s--truthy\? "^[[:upper:]][^[:upper:]]*$" t string-match] 8 (#$ . 13274)]) (byte-code "\300\301\302\303#\300\207" [function-put s-capitalized\? side-effect-free t] 4) #@16 Is S a number? (defalias 's-numeric\? #[(s) "\302\303\304\305\306#)\266\203!\207" [s inhibit-changing-match-data s--truthy\? "^[0-9]+$" nil t string-match] 8 (#$ . 13652)]) (byte-code "\300\301\302\303#\300\301\304\303#\300\207" [function-put s-numeric\? pure t side-effect-free] 5) #@29 Replaces OLD with NEW in S. (defalias 's-replace #[(old new s) "\303\304! \n\305\211%\207" [old new s replace-regexp-in-string regexp-quote t] 6 (#$ . 13946)]) (byte-code "\300\301\302\303#\300\301\304\303#\305\306\307\"\207" [function-put s-replace pure t side-effect-free defalias s-replace-regexp replace-regexp-in-string] 5) (defalias 's--aget #[(alist key) "\302 \"A\207" [key alist assoc-string] 3]) (byte-code "\300\301\302\303#\300\301\304\303#\300\207" [function-put s--aget pure t side-effect-free] 5) #@79 REPLACEMENTS is a list of cons-cells. Each `car` is replaced with `cdr` in S. (defalias 's-replace-all #[(replacements s) "\302\303\304\305\"!\306 \307\211%\207" [replacements s replace-regexp-in-string regexp-opt mapcar car #[(it) "\302 \"\207" [replacements it s--aget] 3] t] 6 (#$ . 14466)]) (byte-code "\300\301\302\303#\300\301\304\303#\300\207" [function-put s-replace-all pure t side-effect-free] 5) #@84 Convert S to lower case. This is a simple wrapper around the built-in `downcase'. (defalias 's-downcase #[(s) "\227\207" [s] 1 (#$ . 14881)]) (byte-code "\300\301\302\303#\300\207" [function-put s-downcase side-effect-free t] 4) #@82 Convert S to upper case. This is a simple wrapper around the built-in `upcase'. (defalias 's-upcase #[(s) "\226\207" [s] 1 (#$ . 15118)]) (byte-code "\300\301\302\303#\300\207" [function-put s-upcase side-effect-free t] 4) #@89 Convert the first word's first character to upper case and the rest to lower case in S. (defalias 's-capitalize #[(s) "\301\302O\226\302\303O\227P\207" [s 0 1 nil] 4 (#$ . 15349)]) (byte-code "\300\301\302\303#\300\207" [function-put s-capitalize side-effect-free t] 4) #@144 Convert each word's first character to upper case and the rest to lower case in S. This is a simple wrapper around the built-in `capitalize'. (defalias 's-titleize #[(s) "\301!\207" [s capitalize] 2 (#$ . 15628)]) (byte-code "\300\301\302\303#\300\207" [function-put s-titleize side-effect-free t] 4) #@211 Threads S through the forms. Inserts S as the last item in the first form, making a list of it if it is not a list already. If there are more forms, inserts the first form as the last item in second form, etc. (defalias 's-with '(macro . #[(s form &rest more) "\204 <\203 @\303 A\nC\"B\207 \nD\207\304\211\n EBB\207" [more form s append s-with] 4 (#$ . 15938)])) (byte-code "\300\301\302\303#\210\300\301\304\305#\207" [put s-with edebug-form-spec (form &rest [&or (function &rest form) fboundp]) lisp-indent-function 1] 4) #@142 Returns first index of NEEDLE in S, or nil. If IGNORE-CASE is non-nil, the comparison is done without paying attention to case differences. (defalias 's-index-of #[(needle s &optional ignore-case) "\305\n! \306\307\310#)\266\203)\207" [ignore-case case-fold-search needle s inhibit-changing-match-data regexp-quote nil t string-match] 7 (#$ . 16475)]) (byte-code "\300\301\302\303#\300\301\304\303#\300\207" [function-put s-index-of pure t side-effect-free] 5) #@26 Return the reverse of S. (defalias 's-reverse #[(s) "\306 \307\216\310 !\203G \311\312\"\262\312\313\314!\210 \203@ \211A\242C\315 @ \"\2037 \211A\242\fB\202$\f\237\n\244)\202\n\260*\202Q \311\312\"\262\237\260*\207" [save-match-data-internal s output input grapheme ucs-normalize-combining-chars match-data #[nil "\301\302\"\207" [save-match-data-internal set-match-data evaporate] 3] multibyte-string-p append nil require ucs-normalize memql] 4 (#$ . 16949)]) (byte-code "\300\301\302\303#\300\301\304\303#\300\207" [function-put s-reverse pure t side-effect-free] 5) #@184 Return a list of matches for REGEX in STRING. Each element itself is a list of matches, as per `match-string'. Multiple matches at the same position will be ignored after the first. (defalias 's-match-strings-all #[(regex string) "\306 \307\216\310\311 GW\203I\312\f #\203I\311\224T\310\306 G\313\245\311   U\204?\314 \"B T\211\202)\237\nB+\202 \n\237,\207" [save-match-data-internal i all-strings string regex match match-data #[nil "\301\302\"\207" [save-match-data-internal set-match-data evaporate] 3] nil 0 string-match 2 match-string num-matches strings] 5 (#$ . 17548)]) (byte-code "\300\301\302\303#\300\207" [function-put s-match-strings-all side-effect-free t] 4) #@88 Return a list of matched positions for REGEXP in STRING. SUBEXP-DEPTH is 0 by default. (defalias 's-matched-positions-all #[(regexp string &optional subexp-depth) "\204\306\307 \310\216\306\311\312\f #\2031 GW\2031\225 \224\225B\nB\306\225)\202\n\237,\207" [subexp-depth save-match-data-internal result pos regexp string 0 match-data #[nil "\301\302\"\207" [save-match-data-internal set-match-data evaporate] 3] nil string-match m] 4 (#$ . 18255)]) (byte-code "\300\301\302\303#\300\207" [function-put s-matched-positions-all side-effect-free t] 4) #@274 When the given expression matches the string, this function returns a list of the whole matching string and a string for each matched subexpressions. If it did not match the returned value is an empty list (nil). When START is non-nil the search will start at that index. (defalias 's-match #[(regexp s &optional start) "\306 \307\216\310 \n #\205@\306 \311 \203= @\n A@ \n\205/ \205/\n\n O\211\f\fB AA+\202\f\237**\207" [save-match-data-internal regexp s start result match-data-list match-data #[nil "\301\302\"\207" [save-match-data-internal set-match-data evaporate] 3] string-match nil beg end subs] 5 (#$ . 18831)]) (byte-code "\300\301\302\303#\300\207" [function-put s-match side-effect-free t] 4) #@45 Slices S up at every index matching REGEXP. (defalias 's-slice-at #[(regexp s) "G\304U\203\n\305C\207\306 \307\216\310\311 \312#\211\203*\304\nO\313 \n\310O\"B\202,C+\207" [s save-match-data-internal i regexp 0 "" match-data #[nil "\301\302\"\207" [save-match-data-internal set-match-data evaporate] 3] nil string-match 1 s-slice-at] 7 (#$ . 19563)]) (byte-code "\300\301\302\303#\300\207" [function-put s-slice-at side-effect-free t] 4) #@29 Split S into list of words. (defalias 's-split-words #[(s) "\302\303\304\305\306\307\305\310\307 ##)\311#\207" [case-fold-search s s-split "[^[:word:]0-9]+" nil replace-regexp-in-string "\\([[:lower:]]\\)\\([[:upper:]]\\)" "\\1 \\2" "\\([[:upper:]]\\)\\([[:upper:]][0-9[:lower:]]\\)" t] 9 (#$ . 20019)]) (byte-code "\300\301\302\303#\300\207" [function-put s-split-words side-effect-free t] 4) #@69 Like MAPCAR, but applies a different function to the first element. (defalias 's--mapcar-head #[(fn-head fn-rest list) "\205 @!\303\nA\"B\207" [list fn-head fn-rest mapcar] 4 (#$ . 20420)]) #@30 Convert S to lowerCamelCase. (defalias 's-lower-camel-case #[(s) "\301\302\303\304\305\306!#\"\207" [s s-join "" s--mapcar-head downcase capitalize s-split-words] 7 (#$ . 20621)]) (byte-code "\300\301\302\303#\300\207" [function-put s-lower-camel-case side-effect-free t] 4) #@30 Convert S to UpperCamelCase. (defalias 's-upper-camel-case #[(s) "\301\302\303\304\305!\"\"\207" [s s-join "" mapcar capitalize s-split-words] 6 (#$ . 20903)]) (byte-code "\300\301\302\303#\300\207" [function-put s-upper-camel-case side-effect-free t] 4) #@26 Convert S to snake_case. (defalias 's-snake-case #[(s) "\301\302\303\304\305!\"\"\207" [s s-join "_" mapcar downcase s-split-words] 6 (#$ . 21165)]) (byte-code "\300\301\302\303#\300\207" [function-put s-snake-case side-effect-free t] 4) #@28 Convert S to dashed-words. (defalias 's-dashed-words #[(s) "\301\302\303\304\305!\"\"\207" [s s-join "-" mapcar downcase s-split-words] 6 (#$ . 21410)]) (byte-code "\300\301\302\303#\300\207" [function-put s-dashed-words side-effect-free t] 4) #@33 Convert S to Capitalized words. (defalias 's-capitalized-words #[(s) "\302!\303\304\305 @!\306\307 A\"B\")\207" [s words s-split-words s-join " " capitalize mapcar downcase] 6 (#$ . 21661)]) (byte-code "\300\301\302\303#\300\207" [function-put s-capitalized-words side-effect-free t] 4) #@31 Convert S to Titleized Words. (defalias 's-titleized-words #[(s) "\301\302\303\304\305!\"\"\207" [s s-join " " mapcar s-titleize s-split-words] 6 (#$ . 21956)]) (byte-code "\300\301\302\303#\300\207" [function-put s-titleized-words side-effect-free t] 4) #@28 Convert S to its initials. (defalias 's-word-initials #[(s) "\301\302\303\304\305!\"\"\207" [s s-join "" mapcar #[(ss) "\301\302O\207" [ss 0 1] 3] s-split-words] 6 (#$ . 22218)]) (byte-code "\300\301\302\303#\304\305\306\307#\210\304\305\310\311#\207" [function-put s-word-initials side-effect-free t put s-format-resolve error-conditions (error s-format s-format-resolve) error-message "Cannot resolve a template to values"] 5) #@458 Format TEMPLATE with the function REPLACER. REPLACER takes an argument of the format variable and optionally an extra argument which is the EXTRA value from the call to `s-format'. Several standard `s-format' helper functions are recognized and adapted for this: (s-format "${name}" 'gethash hash-table) (s-format "${name}" 'aget alist) (s-format "$0" 'elt sequence) The REPLACER function may be used to do any other kind of transformation. (defalias 's-format #[(template replacer &optional extra) "\302 \303\216\304\305\306 \307\211%*\207" [saved-match-data template match-data #[nil "\301!\207" [saved-match-data set-match-data] 2] replace-regexp-in-string "\\$\\({\\([^}]+\\)}\\|[0-9]+\\)" #[(md) "\306\307\"\211\203 \202\310\306\311\"!)\312 \313\216\f\314\267\202>\f \"\202Q\315 \"\202Q\f \"\202Q\316 \317 !\"\202Q\320!\210 \203N\f \"\202Q\f !\211\203_\321\322\"\202c\323\324\",\207" [md m replacer-match-data var replacer extra match-string 2 string-to-number 1 match-data #[nil "\301!\207" [replacer-match-data set-match-data] 2] #s(hash-table size 4 test eq rehash-size 1.5 rehash-threshold 0.8125 purecopy t data (gethash 32 aget 39 elt 46 oref 53)) s--aget slot-value intern set-match-data format "%s" signal s-format-resolve saved-match-data v] 5] t] 6 (#$ . 22656)]) #@92 If `t' interpolate lisp values as lisp. `s-lex-format' inserts values with (format "%S"). (defvar s-lex-value-as-lisp nil (#$ . 23989)) #@23 Expand FMT into lisp. (defalias 's-lex-fmt|expand #[(fmt) "\301\302\303\304\305\306\307\310\"\"\"F\207" [fmt s-format 'aget append (list) mapcar #[(matches) "\301A@\302\303\304A@!EE\207" [matches cons format (if s-lex-value-as-lisp "%S" "%s") intern] 6] s-match-strings-all "${\\([^}]+\\)}"] 10 (#$ . 24132)]) (byte-code "\300\301\302\303#\300\207" [function-put s-lex-fmt|expand side-effect-free t] 4) #@316 `s-format` with the current environment. FORMAT-STR may use the `s-format' variable reference to refer to any variable: (let ((x 1)) (s-lex-format "x is: ${x}")) The values of the variables are interpolated with "%s" unless the variable `s-lex-value-as-lisp' is `t' and then they are interpolated with "%S". (defalias 's-lex-format '(macro . #[(format-str) "\301!\207" [format-str s-lex-fmt|expand] 2 (#$ . 24546)])) (put 's-lex-format 'edebug-form-spec '(form)) #@417 Count occurrences of `regexp' in `s'. `start', inclusive, and `end', exclusive, delimit the part of `s' to match. `start' and `end' are both indexed starting at 1; the initial character in `s' is index 1. This function starts looking for the next match from the end of the previous match. Hence, it ignores matches that overlap a previously found match. To count overlapping matches, use `s-count-matches-all'. (defalias 's-count-matches #[(regexp s &optional start end) "\306 \307\216\310\311\312\"r q\210\313\216\nc\210eb\210\314 \f\206\315 \206\"d#-\207" [save-match-data-internal #1=#:temp-buffer s regexp start end match-data #[nil "\301\302\"\207" [save-match-data-internal set-match-data evaporate] 3] generate-new-buffer " *temp*" t #[nil "\301!\205 \302!\207" [#1# buffer-name kill-buffer] 2] count-matches 1] 4 (#$ . 25024)]) (byte-code "\300\301\302\303#\300\207" [function-put s-count-matches side-effect-free t] 4) #@452 Count occurrences of `regexp' in `s'. `start', inclusive, and `end', exclusive, delimit the part of `s' to match. `start' and `end' are both indexed starting at 1; the initial character in `s' is index 1. This function starts looking for the next match from the second character of the previous match. Hence, it counts matches that overlap a previously found match. To ignore matches that overlap a previously found match, use `s-count-matches'. (defalias 's-count-matches-all #[(regexp s &optional start end) "\306\307\"\310\211\f \205 S \205 SO\311 \312\216 GW\203>\313  \314O\"\2037\nT T\211\202\"*\n,\207" [regexp anchored-regexp match-count i s start format "^%s" 0 match-data #[nil "\301\302\"\207" [save-match-data-internal set-match-data evaporate] 3] s-matches\? nil end narrowed-s save-match-data-internal] 6 (#$ . 25973)]) (byte-code "\300\301\302\303#\300\207" [function-put s-count-matches-all side-effect-free t] 4) #@181 Wrap string S with PREFIX and optionally SUFFIX. Return string S with PREFIX prepended. If SUFFIX is present, it is appended, otherwise PREFIX is used as both prefix and suffix. (defalias 's-wrap #[(s prefix &optional suffix) " \n\206Q\207" [prefix s suffix] 3 (#$ . 26939)]) (byte-code "\300\301\302\303#\300\301\304\303#\305\306\307\"\210\305\310\311\"\210\305\312\313\"\210\305\314\315\"\210\305\316\317\"\210\305\320\321\"\210\305\322\323\"\210\305\324\325\"\210\305\326\327\"\210\305\330\331\"\210\305\332\333\"\210\305\334\335\"\210\305\336\335\"\210\305\337\340\"\210\305\341\335\"\210\305\342\317\"\210\305\343\317\"\210\305\344\345\"\210\346\347!\207" [function-put s-wrap pure t side-effect-free defalias s-blank-p s-blank\? s-blank-str-p s-blank-str\? s-capitalized-p s-capitalized\? s-contains-p s-contains\? s-ends-with-p s-ends-with\? s-equals-p s-equals\? s-less-p s-less\? s-lowercase-p s-lowercase\? s-matches-p s-matches\? s-mixedcase-p s-mixedcase\? s-numeric-p s-numeric\? s-prefix-p s-starts-with\? s-prefix\? s-present-p s-present\? s-starts-with-p s-suffix-p s-suffix\? s-uppercase-p s-uppercase\? provide s] 5)