Up: API  


1.1 (kracht prelude)

1.1.1 Procedures

Procedure: alist-from-url-encoded-body body

Undocumented procedure.

Procedure: assoc-ref-or-empty-str alist field

Undocumented procedure.

Procedure: build-asset-library files

Undocumented procedure.

Procedure: empty-string? s

Undocumented procedure.

Procedure: flatten-list xs

Undocumented procedure.

Procedure: get-short-commit-sha

Undocumented procedure.

Procedure: get-string-all port

Undocumented procedure.

Procedure: html-escape x

Undocumented procedure.

Procedure: html-unescape x

Undocumented procedure.

Procedure: log msg . args

Undocumented procedure.

Procedure: log-error msg . args

Undocumented procedure.

Procedure: log-info msg . args

Undocumented procedure.

Procedure: log-message msg

Undocumented procedure.

Procedure: non-empty-string? s

Undocumented procedure.

Procedure: open-input-output-pipe command

Equivalent to open-pipe with mode OPEN_BOTH

Procedure: open-input-pipe command

Equivalent to open-pipe with mode OPEN_READ

Procedure: string->utf8 _

Undocumented procedure.

Procedure: string-drop-first-last s

Undocumented procedure.

Procedure: string-drop-first-last-line s

Undocumented procedure.

Procedure: string-drop-first-last-n s n

Undocumented procedure.

Procedure: string-replace-substring str substring replacement

Return a new string where every instance of substring in string str has been replaced by replacement. For example:

(string-replace-substring "a ring of strings" "ring" "rut")
⇒ "a rut of struts"
Procedure: syscall cmd

Undocumented procedure.

Procedure: uri-decode str KEY: #:encoding #:decode-plus-to-space?

Percent-decode the given STR, according to ENCODING, which should be the name of a character encoding.

Note that this function should not generally be applied to a full URI string. For paths, use ‘split-and-decode-uri-path’ instead. For query strings, split the query on ‘&’ and ‘=’ boundaries, and decode the components separately.

Note also that percent-encoded strings encode _bytes_, not characters. There is no guarantee that a given byte sequence is a valid string encoding. Therefore this routine may signal an error if the decoded bytes are not valid for the given encoding. Pass ‘#f’ for ENCODING if you want decoded bytes as a bytevector directly. ‘set-port-encoding!’, for more information on character encodings.

If DECODE-PLUS-TO-SPACE? is true, which is the default, also replace instances of the plus character (+) with a space character. This is needed when parsing application/x-www-form-urlencoded data.

Returns a string of the decoded characters, or a bytevector if ENCODING was ‘#f’.

Procedure: uri-encode str KEY: #:encoding #:unescaped-chars

Percent-encode any character not in the character set, UNESCAPED-CHARS.

The default character set includes alphanumerics from ASCII, as well as the special characters ‘-’, ‘.’, ‘_’, and ‘~’. Any other character will be percent-encoded, by writing out the character to a bytevector within the given ENCODING, then encoding each byte as ‘%HH’, where HH is the uppercase hexadecimal representation of the byte.

Procedure: utf8->string _

Undocumented procedure.

Procedure: with-output-to-file file thunk KEY: #:binary #:encoding

THUNK must be a procedure of no arguments, and FILE must be a string naming a file. The effect is unspecified if the file already exists. The file is opened for output, an output port connected to it is made the default value returned by ‘current-output-port’, and the THUNK is called with no arguments. When the THUNK returns, the port is closed and the previous default is restored. Returns the values yielded by THUNK. If an escape procedure is used to escape from the continuation of these procedures, their behavior is implementation dependent.

Procedure: with-output-to-port port thunk

Undocumented procedure.

Procedure: with-output-to-string thunk

Calls THUNK and returns its output as a string.


Up: API