Module Ecaml__.Text
include Ecaml__.Import.Value.Subtype
type value
type t
= private value
We expose
private value
for free identity conversions when the value is nested in some covariant type, e.g.(symbols : Symbol.t list :> Value.t list)
rather thanList.map symbols ~f:Symbol.to_value
.
val sexp_of_t : t -> Ppx_sexp_conv_lib.Sexp.t
val eq : t -> t -> bool
eq t1 t2 = Value.eq (to_value t1) (to_value t2)
, i.e.eq
checks whether the Emacs values underlyingt1
andt2
are physically equal. This is different thanphys_equal t1 t2
, because we don't always wrapeq
Emacs values inphys_equal
OCaml values. I.e.phys_equal t1 t2
implieseq t1 t2
, but not the converse.
val is_in_subtype : value -> bool
include Ecaml_value__.Valueable0.S with type t := t
val of_value_exn : Ecaml_value__.Value0.t -> t
val to_value : t -> Ecaml_value__.Value0.t
val type_ : t type_
module Compare_as_string : sig ... end
val char_code : t -> int -> Ecaml.Char_code.t
(describe-function 'aref)
(Info-goto-node "(elisp)String Basics")
val set_char_code : t -> int -> Ecaml.Char_code.t -> unit
(describe-function 'aset)
(Info-goto-node "(elisp)String Basics")
val of_utf8_bytes : string -> t
val to_utf8_bytes : t -> string
val length : t -> int
length t
returns the number of characters int
.
val num_bytes : t -> int
num_bytes t
returns the number of bytes in the representation oft
, which, ifis_multibyte t
, can be greater thanlength t
.(describe-function 'string-bytes)
module Face_spec : sig ... end
(Info-goto-node "(elisp)Special Properties")
module Display_spec : sig ... end
module Property_name : sig ... end
(Info-goto-node "(elisp)Text Properties")
module Property : sig ... end
(Info-goto-node "(elisp)Text Properties")
val propertize : t -> Property.t list -> t
(describe-function 'propertize)
(Info-goto-node "(elisp)Changing Properties")
val property_value : t -> at:int -> 'a Property_name.t -> 'a option
property_value t ~at property_name
returns the value ofproperty_name
for the character afterat
.at
is a zero-based index intot
;property_value
raises unless0 <= at <= length t
(allowinglength
is different than OCaml).(describe-function 'get-text-property)
(Info-goto-node "(elisp)Examining Properties")
val properties : t -> at:int -> Property.t list
(describe-function 'text-properties-at)
val set_property : ?start:int -> ?end_:int -> t -> 'a Property_name.t -> 'a -> unit
(describe-function 'put-text-property)
(Info-goto-node "(elisp)Changing Properties")
.
val set_properties : ?start:int -> ?end_:int -> t -> Property.t list -> unit
(describe-function 'set-text-properties)
(Info-goto-node "(elisp)Changing Properties")
val add_properties : ?start:int -> ?end_:int -> t -> Property.t list -> unit
(describe-function 'add-text-properties)
(Info-goto-node "(elisp)Changing Properties")
val remove_properties : ?start:int -> ?end_:int -> t -> Property_name.Packed.t list -> unit
(describe-function 'remove-list-of-text-properties)
(Info-goto-node "(elisp)Changing Properties")
val is_multibyte : t -> bool
(describe-function 'multibyte-string-p)
(Info-goto-node "(elisp)Text Representations")
val to_multibyte : t -> t
(describe-function 'string-to-multibyte)
(Info-goto-node "(elisp)Converting Representations")
val to_unibyte_exn : t -> t
(describe-function 'string-to-unibyte)
(Info-goto-node "(elisp)Converting Representations")
val of_char_array : Ecaml.Char_code.t array -> t
(describe-function 'string)
val to_char_array : t -> Ecaml.Char_code.t array
(describe-function 'string-to-vector)