3 quotestrdup, quoterunestrdup, unquotestrdup, unquoterunestrdup, quotestrfmt, quoterunestrfmt, quotefmtinstall, fmtdoquote \- quoted character strings
10 char *quotestrdup(char *s)
13 Rune *quoterunestrdup(Rune *s)
16 char *unquotestrdup(char *s)
19 Rune *unquoterunestrdup(Rune *s)
25 int quoterunestrfmt(Fmt*)
28 void quotefmtinstall(void)
31 int (*fmtdoquote)(int c)
34 These routines manipulate character strings, either adding or removing
36 In the quoted form, the strings are in the style of
38 with single quotes surrounding the string.
39 Embedded single quotes are indicated by a doubled single quote.
52 The empty string is represented by two quotes,
55 The first four functions act as variants of
60 freshly allocated copy of the string, created using
63 returns a quoted copy of
69 with the quotes evaluated.
72 versions of these functions do the same for
77 The string returned by
81 has the following properties:
84 If the original string
86 is empty, the returned string is
92 contains no quotes, blanks, or control characters,
93 the returned string is identical to
99 needs quotes to be added, the first character of the returned
100 string will be a quote.
113 If it is non-nil, characters are passed to that function to see if they should
115 This mechanism allows programs to specify that
116 characters other than blanks, control characters, or quotes be quoted.
117 Regardless of the return value of
119 blanks, control characters, and quotes are always quoted.
123 function that flags any character special to
131 formatting routines that produce quoted strings as output.
132 They may be installed by hand, but
134 installs them under the standard format characters
138 (They are not installed automatically.)
139 If the format string includes the alternate format character
143 the printed string will always be quoted; otherwise quotes will only be provided if necessary
146 .B http://swtch.com/plan9port/unix