package spotlib

  1. Overview
  2. Docs
Legend:
Page
Library
Module
Module type
Parameter
Class
Class type
Source

Module Spotlib.AtSource

Small @var@ replacement language

Sourceval replace_variables : (string -> string) -> string -> string

replace_variables f s replaces the occurrences of matches with regexp "A-Za-z0-9_+" surrounded by '@' chars in s by function f.

Ex. replace_variables String.uppercase "hello \@world\@" = "hello WORLD"

Sourceval replace_file : (string -> string) -> string -> string -> unit

replace_variables f infile outfile replaces the occurrences of matches with regexp "A-Za-z0-9_+" surrounded by '@' chars by function f in a file infile and write the result to a file outfile.