/usr/local/lib/swipl/library/strings.pl
All Application Manual Name SummaryHelp

  • swipl
    • library
      • error.pl
      • debug.pl
      • apply.pl -- Apply predicates on a list
      • lists.pl -- List Manipulation
      • broadcast.pl -- Event service
      • shlib.pl
      • option.pl -- Option list processing
      • thread_pool.pl
      • gensym.pl
      • settings.pl -- Setting management
      • arithmetic.pl
      • main.pl
      • readutil.pl
      • operators.pl
      • pairs.pl
      • prolog_source.pl
      • record.pl -- Access compound arguments by name
      • quasi_quotations.pl
      • pure_input.pl -- Pure Input from files and streams
      • solution_sequences.pl
      • ordsets.pl -- Ordered set manipulation
      • random.pl
      • base64.pl
      • aggregate.pl -- Aggregation operators on backtrackable predicates
      • yall.pl
      • sandbox.pl
      • apply_macros.pl -- Goal expansion rules to avoid meta-calling
      • assoc.pl
      • prolog_format.pl -- Analyse format specifications
      • predicate_options.pl
      • csv.pl -- Process CSV (Comma-Separated Values) data
      • pprint.pl -- Pretty Print Prolog terms
      • atom.pl
      • modules.pl -- Module utility predicates
      • occurs.pl
      • prolog_xref.pl
      • prolog_colour.pl
      • lazy_lists.pl
      • ugraphs.pl
      • url.pl -- Analysing and constructing URL
      • www_browser.pl
      • prolog_pack.pl
      • git.pl
      • rbtrees.pl
      • dif.pl -- The dif/2 constraint
      • charsio.pl
      • prolog_stack.pl
      • edinburgh.pl -- Some traditional Edinburgh predicates
      • prolog_clause.pl
      • prolog_breakpoints.pl
      • wfs.pl
      • dialect.pl
      • prolog_code.pl
      • sort.pl
      • iostream.pl -- Utilities to deal with streams
      • dicts.pl -- Dict utilities
      • varnumbers.pl -- Utilities for numbered terms
      • base32.pl
      • codesio.pl -- I/O on Lists of Character Codes
      • coinduction.pl -- Co-Logic Programming
      • date.pl -- Process dates and times
      • heaps.pl -- heaps/priority queues
      • statistics.pl
      • terms.pl
      • utf8.pl
      • when.pl
      • backcomp.pl -- Backward compatibility
      • shell.pl -- Elementary shell commands
      • make.pl -- Reload modified source files
      • prolog_debug.pl
      • qsave.pl
      • zip.pl -- Access resource ZIP archives
      • listing.pl -- List programs and pretty print clauses
      • strings.pl -- String utilities
        • string/4
        • interpolate_string/4
        • string_lines/2
        • dedent_lines/3
        • indent_lines/3
        • indent_lines/4
      • rwlocks.pl
      • check.pl -- Consistency checking
      • help.pl
      • edit.pl
      • persistency.pl
      • threadutil.pl -- Interactive thread utilities
      • tables.pl
      • ctypes.pl -- Character code classification
      • quintus.pl
      • optparse.pl
      • writef.pl
      • explain.pl
      • prolog_codewalk.pl
      • prolog_metainference.pl
      • prolog_coverage.pl
      • ansi_term.pl -- Print decorated text to ANSI consoles
      • thread.pl
      • macros.pl
      • intercept.pl
      • oset.pl
      • nb_set.pl -- Non-backtrackable sets
      • prolog_autoload.pl
      • prolog_trace.pl
      • prolog_history.pl
      • prolog_config.pl
      • prolog_jiti.pl
      • system.pl -- System utilities
      • increval.pl
      • fastrw.pl
 string(+Content, +Args, +Binding, -DOM)
Implements the quasi quotation syntax string. If the first character of the content is a newline (i.e., there is a newline immediately after the || token) this first uses dedent_lines/3 to the remove common white space prefix from the lines. This is called with the option chars("\s\t|"), i.e., also removing | characters and tab(8).

If the quasi quotation syntax carries arguments (e.g., string(To)), the string is compiled into a function that produces the result of interpolating the arguments into the template. See user functions on dict objects. If there are no arguments, the result is simply the final string.

See also
- interpolate_string/4 for the interpolation syntax.
- Section for examples and discussion.
To be done
- Specify tab width and allow for {@Goal} templates.