package frama-c
Install
dune-project
Dependency
Authors
-
MMichele Alberti
-
TThibaud Antignac
-
GGergö Barany
-
PPatrick Baudin
-
NNicolas Bellec
-
TThibaut Benjamin
-
AAllan Blanchard
-
LLionel Blatter
-
FFrançois Bobot
-
RRichard Bonichon
-
VVincent Botbol
-
QQuentin Bouillaguet
-
DDavid Bühler
-
ZZakaria Chihani
-
SSylvain Chiron
-
LLoïc Correnson
-
JJulien Crétin
-
PPascal Cuoq
-
ZZaynah Dargaye
-
BBasile Desloges
-
JJean-Christophe Filliâtre
-
PPhilippe Herrmann
-
MMaxime Jacquemin
-
BBenjamin Jorge
-
FFlorent Kirchner
-
AAlexander Kogtenkov
-
RRemi Lazarini
-
TTristan Le Gall
-
KKilyan Le Gallic
-
JJean-Christophe Léchenet
-
MMatthieu Lemerre
-
DDara Ly
-
DDavid Maison
-
CClaude Marché
-
AAndré Maroneze
-
TThibault Martin
-
FFonenantsoa Maurica
-
MMelody Méaulle
-
BBenjamin Monate
-
YYannick Moy
-
PPierre Nigron
-
AAnne Pacalet
-
VValentin Perrelle
-
GGuillaume Petiot
-
DDario Pinto
-
VVirgile Prevosto
-
AArmand Puccetti
-
FFélix Ridoux
-
VVirgile Robles
-
JJan Rochel
-
MMuriel Roger
-
CCécile Ruet-Cros
-
JJulien Signoles
-
FFabien Siron
-
NNicolas Stouls
-
HHugo Thievenaz
-
KKostyantyn Vorobyov
-
BBoris Yakobowski
Maintainers
Sources
sha256=868d57ef8007fe6c0836cd151d8c294003af34aa678285eff9547662cad36aa3
doc/frama-c.kernel/Frama_c_kernel/Rich_text/index.html
Module Frama_c_kernel.Rich_text
Text enriched with semantic tags
This module provides a rich text type that represents a string of characters enriched by semantic tags. It is intended to provide a way to store texts that can be output in several format, for instance in html or using ANSI sequences in terminals. When the text is pretty printed, the semantic tags are output in the usual way on the formatter (which can translate the semantic tags to html markup for instance). See Format for more details about semantic tags.
val empty : tempty is the empty text, containing neither plain text nor tags.
val is_empty : t -> boolis_empty text returns true if text is empty. A rich text containing only semantic tags is not considered empty.
val of_string : string -> tof_string s returns a plain text equal to s with no semantic tags.
val size : t -> intlength text returns the number of characters in the text.
val plain : t -> stringplain text returns the plain string in the text (without any tag).
val contains : t -> char -> boolcontains text c returns whether text contains the character c.
val index : t -> char -> intindex text c finds the first index of character c.
truncate ~start_pos ~end_pos text truncate the text text to the range from start_pos (included, default to 0) to end_pos (excluded, default to the text size). All tags outside this range are removed.
Indicates the total available space and the position of the truncation
val pretty :
?truncate:truncation ->
?ellipsis:string ->
Format.formatter ->
t ->
unitpretty fmt text pretty-prints the text onto the given formatter fmt, with the semantic tags. The original text has been already laid out with respect to horizontal and vertical boxes, and this layout will be output as-it-is into the formatter.
val to_string :
?prefix:(Format.formatter -> unit) ->
?suffix:(Format.formatter -> unit) ->
?truncate:truncation ->
?ellipsis:string ->
t ->
stringPretty prints the text into a string
val need_truncation : ?truncate:truncation -> t -> boolBuffers for building rich text
Buffer for creating rich text.
The buffer grows on demand, but is protected against huge messages. Maximal size is around 2 billions ASCII characters, which should be enough to store more than 25kloc source text.
module Buffer : sig ... endDirect formatting
val sprintf :
?indent:int ->
?margin:int ->
?trim:bool ->
?truncate:truncation ->
?ellipsis:string ->
('a, Format.formatter, unit, string) format4 ->
'aPretty prints to a string.
val mprintf :
?indent:int ->
?margin:int ->
?trim:bool ->
('a, Format.formatter, unit, t) format4 ->
'aPretty prints to a rich text.