• 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

5.2.2 Predicates that operate on strings
All Application Manual Name SummaryHelp

  • Documentation
    • Reference manual
      • SWI-Prolog extensions
        • The string type and its double quoted syntax
          • Predicates that operate on strings
            • atom_string/2
            • number_string/2
            • term_string/2
            • term_string/3
            • string_chars/2
            • string_codes/2
            • string_bytes/3
            • text_to_string/2
            • string_length/2
            • string_code/3
            • get_string_code/3
            • string_concat/3
            • split_string/4
            • sub_string/5
            • atomics_to_string/2
            • atomics_to_string/3
            • string_upper/2
            • string_lower/2
            • read_string/3
            • read_string/5
            • open_string/2
    • Packages
Availability:built-in
string_bytes(?String, ?Bytes, +Encoding)
True when the (Unicode) String is represented by Bytes in Encoding. If String is instantiated it may represent text as an atom, string, list of character codes or list or characters. Bytes is always a list of integers in the range 0 ... 255. At least one of String or Bytes must be instantiated. This predicate is notably intended as an intermediate step to perform byte oriented operations on text. Examples are (base64) encoding, encryption, computing a (secure) hash, etc. Encoding is typically utf8. All valid stream encodings except for wchar_t are supported. See section 2.18.1. Note that this translation is only provided for strings. Creating an atom from bytes requires atom_string/2.173Strings are an efficient intermediate and this conversion is needed only in some uncommon scenarios.
ClioPatria (version V3.1.1-51-ga0b30a5)