{"size": 1092, "ext": "scrbl", "max_stars_repo_path": "sugar/scribblings/string.scrbl", "max_stars_repo_name": "mbutterick/sugar", "max_stars_repo_stars_event_min_datetime": "2015-04-13T15:10:18.000Z", "max_stars_repo_stars_event_max_datetime": "2020-03-21T06:05:14.000Z", "max_issues_repo_path": "sugar/scribblings/string.scrbl", "max_issues_repo_name": "mbutterick/sugar", "max_issues_repo_issues_event_min_datetime": "2015-04-13T15:38:56.000Z", "max_issues_repo_issues_event_max_datetime": "2020-02-16T20:00:54.000Z", "max_forks_repo_path": "sugar/scribblings/string.scrbl", "max_forks_repo_name": "mbutterick/sugar", "max_forks_repo_forks_event_min_datetime": "2015-04-13T13:41:00.000Z", "max_forks_repo_forks_event_max_datetime": "2016-08-13T17:02:00.000Z"}
{"max_stars_count": 16, "max_issues_count": 18, "max_forks_count": 5, "avg_line_length": 20.2222222222, "max_line_length": 89, "alphanum_fraction": 0.6904761905}
#lang scribble/manual

@(require scribble/eval (for-label racket sugar))

@(define my-eval (make-base-eval))
@(my-eval `(require sugar))

@title{String}
@defmodule[#:multi (sugar/string (submod sugar/string safe))]


@defproc[
(starts-with?
[str stringish?]
[starter stringish?])
boolean?]
Return @racket[#t] if @racket[_str] starts with @racket[_starter], otherwise @racket[#f].

@examples[#:eval my-eval
(starts-with? "foobar" "foo")
(starts-with? "foobar" "foobar")
(starts-with? "foobar" "zam")
(starts-with? "foobar" "foobars")
]


@defproc[
(ends-with?
[str stringish?]
[ender stringish?])
boolean?]
Return @racket[#t] if @racket[_str] ends with @racket[_ender], otherwise @racket[#f].

@examples[#:eval my-eval
(ends-with? "foobar" "foo")
(ends-with? "foobar" "foobar")
(ends-with? "foobar" "zam")
(ends-with? "foobar" "foobars")
]


@defproc[
(capitalized?
[str stringish?])
boolean?]
Return @racket[#t] if @racket[_str] starts with a capital letter, otherwise @racket[#f].

@examples[#:eval my-eval
(capitalized? "Brennan")
(capitalized? "Brennan stinks")
(capitalized? "stinks")
]

