• Places
    • Home
    • Graphs
    • Prefixes
  • Admin
    • Users
    • Settings
    • Plugins
    • Statistics
  • CPACK
    • Home
    • List packs
    • Submit pack
  • Repository
    • Load local file
    • Load from HTTP
    • Load from library
    • Remove triples
    • Clear repository
  • Query
    • YASGUI SPARQL Editor
    • Simple Form
    • SWISH Prolog shell
  • Help
    • Documentation
    • Tutorial
    • Roadmap
    • HTTP Services
  • Login

A.54 library(strings): String utilities
All Application Manual Name SummaryHelp

  • Documentation
    • Reference manual
      • The SWI-Prolog library
        • library(strings): String utilities
          • string/4
          • interpolate_string/4
          • string_lines/2
          • dedent_lines/3
          • indent_lines/3
          • indent_lines/4
    • Packages
Availability::- use_module(library(strings)).(can be autoloaded)
Sourceinterpolate_string(:In, -Out, +Map, +Options)
Establish a string from a template by replacing patterns. Supported patterns are:
{Name}
If Map contains Name=Value, insert Value using write/1. If Name does not appear in Map, raise an existence error. Name must satisfy the rules for a Prolog variable.
{Name,Default}
As above, but if Name does not appear in Map, use Value
{@(Goal)}
Insert the output (to current_output) of Goal here. For safety reasons only accepted if Options contains goals(true)
ClioPatria (version V3.1.1-51-ga0b30a5)