File: encode-web.2gg

package info (click to toggle)
golf 601.4.41-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 2,824 kB
  • sloc: ansic: 20,020; sh: 1,171; makefile: 292
file content (42 lines) | stat: -rw-r--r-- 830 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
.TH GOLF 2gg $VERSION $DATE Development Tools
.SH NAME
encode-web \-  (web-encoding)
.SH PURPOSE
Web(HTML)-encode string.

.SH SYNTAX

.RS 4
.EX

encode-web <string> to <encoded string> \\
    [ input-length <length> ]

.EE
.RE

.SH DESCRIPTION
encode-web encodes <string> so it can be used in a HTML-like markup text (such as a web page or an XML/XHTML document), and stores the result in <encoded string>. 

You can encode only the first <length> bytes, given by "input-length" clause.

.SH EXAMPLES
In this example, a string "str" will be web-encoded and the result is in "result" variable:

.RS 4
.EX

set-string str="  x<y>z&\[char92]"'  "
encode-web str to result 

.EE
.RE

The "result" is "   x&lt;y&gt;z&amp;&quot;&apos;  ".
.SH SEE ALSO
 Web encoding

\fBdecode-web\fP  
\fBencode-web\fP   
See all 
\fBdocumentation\fP