Did you know ... Search Documentation:
Pack pac -- prolog/util/misc.pl
PublicShow source
 shell_string(+X:term, -Y:string) is det
Expand a shell command term X into a string that can be passed to shell/1.
 completing_optional_args(+X, +Y, -Z) is det
option Z is unified with Y completed with default option X.
 set(+X:term, -Y:list) is det
Evaluate a set expression X into a list Y.
 insert(+M:term, +X:list, -Y:list) is det
Insert M beteen every successive elements of X, and unify Y with the result.
 desugaring(+X:term, -Y:term) is det
Eliminate infix '-' and '/', and prefix '+', '-', and ufify Y with the result.
 list(+X:term, -Y:list) is det
Expand a list term X into a list Y.
 string(+X:term, -Y:string) is det
Expand a string term X into a string Y.

Re-exported predicates

The following predicates are exported from this file while their implementation is defined in imported modules or non-module files loaded by this module.

 parse_time(+Text, -Stamp) is semidet
 parse_time(+Text, ?Format, -Stamp) is semidet
Stamp is a timestamp created from parsing Text using the representation Format. Currently supported formats are:
rfc_1123
Preferred for the HTTP protocol to represent time-stamps, e.g.
Fri, 08 Dec 2006 15:29:44 GMT

All components except for the time zone are obligatory. If the time zone is omitted, the time is interpreted as local time.

rfc_1036
(Outdated) alternative for HTTP Protocol, e.g.
Sunday, 06-Nov-94 08:49:37 GMT
iso_8601
Commonly used in XML documents. Actually the XML RFC3339 is a profile of ISO8601. For example
2006-12-08T15:29:44Z

The ISO8601 format allows removing components from the right, returning the lowest time stamp in the specified internal. If a time is specified but no time zone, the time stamp is computed for the local time. If only the date components are specified, the stamp uses UTC. To compute the start of a day in local time, use e.g. 2006-12-08T00.

asctime
ANSI C's asctime() format, e.g.
Sun Nov  6 08:49:37 1994

This format has no time zone and is interpreted as local time.

Arguments:
Text- is an atom, string or list of character codes.
See also
- xsd_time_string/3 from library(sgml) implements RFC3339 strictly.

Undocumented predicates

The following predicates are exported, but not or incorrectly documented.

 compile_pred_word(Arg1, Arg2, Arg3, Arg4)
 random_choice(Arg1, Arg2)
 collect_subterm(Arg1, Arg2, Arg3)
 collect_subterm(Arg1, Arg2, Arg3, Arg4)
 cs(Arg1, Arg2)
 dir_minus(Arg1, Arg2, Arg3)
 dir_plus(Arg1, Arg2, Arg3)
 directory_files(Arg1, Arg2, Arg3)
 directory_remove_ymhms(Arg1)
 drop3zw(Arg1, Arg2)
 find_exportables_from_calls(Arg1, Arg2)
 ignore(Arg1, Arg2)
 insert_pause(Arg1, Arg2)
 kanji(Arg1, Arg2, Arg3)
 map_directory_files(Arg1, Arg2)
 matrix_paths(Arg1, Arg2)
 parse_utf8(Arg1, Arg2)
 predicate_arity(Arg1, Arg2)
 predicate_arity_for_export(Arg1, Arg2)
 rename_directory_suffix(Arg1, Arg2, Arg3)
 split_by_filler(Arg1, Arg2, Arg3)
 shell_string(Arg1, Arg2, Arg3)
 qshell_string(Arg1, Arg2)
 texadjust(Arg1, Arg2)
 texuncomment(Arg1, Arg2)
 token_and_split(Arg1, Arg2, Arg3)
 try2problem(Arg1, Arg2)
 expand_sgn_brace(Arg1, Arg2)