File: string_ext.mli

package info (click to toggle)
ocamlformat 0.27.0-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 12,068 kB
  • sloc: ml: 61,288; pascal: 4,739; lisp: 229; sh: 217; makefile: 121
file content (13 lines) | stat: -rw-r--r-- 524 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
include module type of Base.String

val starts_with_whitespace : string -> bool
(** [starts_with_whitespace s] holds if [s] is non empty and starts with a
    whitespace character. *)

val ends_with_whitespace : string -> bool
(** [ends_with_whitespace s] holds if [s] is non empty and ends with a
    whitespace character. *)

val indent_of_line : string -> int option
(** [indent_of_line s] is the indentation at the beginning of [s].
    Returns [None] if the first line of the string is only whitespaces or is empty. *)