lib/vstr.bend checks
raw source on the hub · import 0x0bae9aeb11ebfcadb010bbe6e89fbbff/lib/vstr.bend as Vstr
2 imports
import Base import ./mac_types.bend as T
Definitions
def not_empty_keep source · line 6 · raw
@e:Bool -> @s:String -> @rest:List<&2, String> -> List<&2, String>
def nonempty source · line 13 · raw
@xs:List<&2, String> -> List<&2, String>
def words source · line 20 · raw
@s:String -> List<&2, String>
def nth source · line 23 · raw
@xs:List<&2, String> -> @n:Nat -> String
def last source · line 34 · raw
@xs:List<&2, String> -> String
def count source · line 45 · raw
@xs:List<&2, String> -> Nat
def digit_or_stop source · line 48 · raw
@d:Bool -> @c:Char -> @tail:String -> String
def digits_of source · line 55 · raw
@cs:List<&2, Char> -> String
def digits source · line 62 · raw
@s:String -> String
def keep_new source · line 65 · raw
@dup:Bool -> @x:String -> @rest:List<&2, String> -> List<&2, String>
def dedupe source · line 72 · raw
@xs:List<&2, String> -> List<&2, String>
def append source · line 79 · raw
@a:List<&2, String> -> @b:List<&2, String> -> List<&2, String>
def quoted source · line 82 · raw
@xs:List<&2, String> -> List<&2, String>
def quote_all source · line 89 · raw
@xs:List<&2, String> -> String
def join_lines source · line 92 · raw
@xs:List<&2, String> -> String
def pick source · line 96 · raw
@c:Bool -> @a:String -> @b:String -> String
---- escaping ----
def pick_esc source · line 103 · raw
@bs:Bool -> @q:Bool -> @c:Char -> String
def esc_char source · line 114 · raw
@+c:Char -> String
def esc_chars source · line 117 · raw
@cs:List<&2, Char> -> String
def esc source · line 125 · raw
@s:String -> String
Escape for a Bend string literal.
def nix_esc_char source · line 128 · raw
@+c:Char -> String
def nix_esc_chars source · line 131 · raw
@cs:List<&2, Char> -> String
def nix_str source · line 139 · raw
@s:String -> String
A string as a Nix string literal.
def nix_strs source · line 142 · raw
@xs:List<&2, String> -> String
def nix_list source · line 150 · raw
@xs:List<&2, String> -> String
A list of strings as a Nix list.
def setting_line source · line 153 · raw
@name:String -> @k:String -> @v:String -> String
def line_if source · line 156 · raw
@keep:Bool -> @l:String -> List<&2, String>
def xml_entity source · line 165 · raw
@+seg:String -> String
---- plist values, as defaults export writes them (real characters, unlike defaults read) ----
def xml_entities source · line 172 · raw
@segs:List<&2, String> -> String
def xml_unescape source · line 179 · raw
@+s:String -> String
def plist_scalar source · line 183 · raw
@+v:String -> String
"<true/>" -> "1", "<false/>" -> "0", "<integer>3</integer>" -> "3", "<string>a & b</string>" -> "a & b"; "" when unset.
def export_key source · line 189 · raw
@+args:String -> @+key:String -> String
Shell: the XML value of top-level key in defaults <args> export-style output (args like "export -g", "-currentHost export com.apple.x").