• 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

4.24 Character properties
All Application Manual Name SummaryHelp

  • Documentation
    • Reference manual
      • Built-in Predicates
        • Character properties
          • code_type/2
          • char_type/2
          • Case conversion
          • White space normalization
            • normalize_space/2
          • Language-specific comparison
    • Packages

4.24.2 White space normalization

normalize_space(-Out, +In)
Normalize white space in In. All leading and trailing white space is removed. All non-empty sequences of white space characters are replaced by a single space (\u0020) character. Out uses the same conventions as with_output_to/2 and format/3.

A character counts as white space if it satisfies code_type(Code, space), i.e., the C library function iswspace(). This depends on the locale. Using a Unicode locale this includes the Unicode separator characters such as \u00a0 (no-break space) and \u3000 (ideographic space), while in the C locale only the ASCII white space characters are recognised. Note that the bidi format characters \u200e and \u200f are not white space and are thus preserved.

ClioPatria (version V3.1.1-59-g7b9a7a3)