Title: Common String Format Validation
Version: 0.1.0
Description: Validates common string formats including financial identifiers (ISIN, CUSIP, SEDOL, FIGI, IBAN, LEI), publication identifiers (ISBN, ISSN, DOI, ORCID), and general formats (email, UUID, URL, semver), with check digit verification where applicable.
License: MIT + file LICENSE
URL: https://m-muecke.github.io/checkstring/, https://github.com/m-muecke/checkstring
BugReports: https://github.com/m-muecke/checkstring/issues
Depends: R (≥ 4.1.0)
Suggests: curl, testthat (≥ 3.0.0)
Config/testthat/edition: 3
Encoding: UTF-8
RoxygenNote: 7.3.3
NeedsCompilation: no
Packaged: 2026-03-01 12:13:22 UTC; mmuecke
Author: Maximilian Mücke ORCID iD [aut, cre]
Maintainer: Maximilian Mücke <muecke.maximilian@gmail.com>
Repository: CRAN
Date/Publication: 2026-03-05 19:30:08 UTC

Assert that dots are empty

Description

Assert that dots are empty

Usage

assert_empty_dots(...)

Arguments

...

(any)
Ellipsis arguments to check.

Value

NULL invisibly if empty, otherwise throws an error.

Examples

assert_empty_dots()

Check if an argument is a base64 string

Description

Check if an argument is a base64 string

Usage

is_base64(x)

Arguments

x

(any)
Object to check.

Value

TRUE if x is a valid base64 string, FALSE otherwise.

Examples

is_base64("SGVsbG8gV29ybGQ=")

Check if an argument is base64url string

Description

Check if an argument is base64url string

Usage

is_base64url(x)

Arguments

x

(any)
Object to check.

Value

TRUE if x is a valid base64url string, FALSE otherwise.

Examples

is_base64url("SGVsbG8gV29ybGQ")

Check if an argument is a BIC/SWIFT code string

Description

Check if an argument is a BIC/SWIFT code string

Usage

is_bic(x)

Arguments

x

(any)
Object to check.

Value

TRUE if x is a valid BIC/SWIFT code string, FALSE otherwise.

References

https://en.wikipedia.org/wiki/ISO_9362 https://knowledge.xmldation.com/support/iso20022/general_rules/bic

Examples

is_bic("DEUTDEFF")

Check if an argument is a CUID2 string

Description

Check if an argument is a CUID2 string

Usage

is_cuid2(x)

Arguments

x

(any)
Object to check.

Value

TRUE if x is a valid CUID2 string, FALSE otherwise.

Examples

is_cuid2("ckopqwooh000001la8mbi2im9")

Check if an argument is a valid CUSIP string

Description

Validates CUSIP format including Luhn-variant check digit verification.

Usage

is_cusip(x)

Arguments

x

(any)
Object to check.

Value

TRUE if x is a valid CUSIP string, FALSE otherwise.

References

https://en.wikipedia.org/wiki/CUSIP

Examples

is_cusip("037833100")

Check if an argument is a DOI string

Description

Check if an argument is a DOI string

Usage

is_doi(x)

Arguments

x

(any)
Object to check.

Value

TRUE if x is a valid DOI string, FALSE otherwise.

References

https://www.doi.org/the-identifier/what-is-a-doi/

Examples

is_doi("10.1038/nphys1170")

Check if an argument is a email address string

Description

Check if an argument is a email address string

Usage

is_email(x)

Arguments

x

(any)
Object to check.

Value

TRUE if x is a valid email address string, FALSE otherwise.

Examples

is_email("user@example.com")

Check if an argument is a valid FIGI string

Description

Validates FIGI (Financial Instrument Global Identifier) format including Luhn check digit verification.

Usage

is_figi(x)

Arguments

x

(any)
Object to check.

Value

TRUE if x is a valid FIGI string, FALSE otherwise.

References

https://en.wikipedia.org/wiki/Financial_Instrument_Global_Identifier https://www.openfigi.com/about/overview

Examples

is_figi("BBG000BLNNH6")

Check if an argument is a hexadecimal string

Description

Check if an argument is a hexadecimal string

Usage

is_hex(x)

Arguments

x

(any)
Object to check.

Value

TRUE if x is a valid non-empty hexadecimal string, FALSE otherwise.

Examples

is_hex("deadbeef")

Check if an argument is a hostname string

Description

Check if an argument is a hostname string

Usage

is_hostname(x)

Arguments

x

(any)
Object to check.

Value

TRUE if x is a valid hostname string, FALSE otherwise.

References

https://en.wikipedia.org/wiki/Hostname

Examples

is_hostname("example.com")

Check if an argument is a valid IBAN string

Description

Validates IBAN format including MOD-97-10 check digit verification (ISO/IEC 7064).

Usage

is_iban(x)

Arguments

x

(any)
Object to check.

Value

TRUE if x is a valid IBAN string, FALSE otherwise.

References

https://en.wikipedia.org/wiki/International_Bank_Account_Number

Examples

is_iban("GB29NWBK60161331926819")

Check if an argument is an IPv4 address string

Description

Check if an argument is an IPv4 address string

Usage

is_ipv4(x)

Arguments

x

(any)
Object to check.

Value

TRUE if x is a valid IPv4 address string, FALSE otherwise.

Examples

is_ipv4("192.168.1.1")

Check if an argument is an ISBN string

Description

Validates ISBN-10 and ISBN-13 formats, including check digit verification. Hyphens and spaces are allowed as separators.

Usage

is_isbn(x)

Arguments

x

(any)
Object to check.

Value

TRUE if x is a valid ISBN string, FALSE otherwise.

References

https://en.wikipedia.org/wiki/International_Standard_Book_Number

Examples

is_isbn("978-0-306-40615-7")

Check if an argument is a valid ISIN string

Description

Validates ISIN (International Securities Identification Number) format including Luhn check digit verification.

Usage

is_isin(x)

Arguments

x

(any)
Object to check.

Value

TRUE if x is a valid ISIN string, FALSE otherwise.

References

https://en.wikipedia.org/wiki/International_Securities_Identification_Number

Examples

is_isin("US0378331005")

Check if an argument is an ISSN string

Description

Validates ISSN format including check digit verification.

Usage

is_issn(x)

Arguments

x

(any)
Object to check.

Value

TRUE if x is a valid ISSN string, FALSE otherwise.

References

https://www.loc.gov/issn/check.html

Examples

is_issn("0378-5955")

Check if an argument is a valid LEI string

Description

Validates LEI (Legal Entity Identifier) format including MOD-97-10 check digit verification (ISO/IEC 7064).

Usage

is_lei(x)

Arguments

x

(any)
Object to check.

Value

TRUE if x is a valid LEI string, FALSE otherwise.

References

https://en.wikipedia.org/wiki/Legal_Entity_Identifier https://www.govinfo.gov/content/pkg/CFR-2016-title12-vol8/xml/CFR-2016-title12-vol8-part1003-appC.xml

Examples

is_lei("7H6GLXDRUGQFU57RNE97")

Check if an argument is a MAC address string

Description

Check if an argument is a MAC address string

Usage

is_mac(x)

Arguments

x

(any)
Object to check.

Value

TRUE if x is a valid MAC address string, FALSE otherwise.

Examples

is_mac("00:1B:44:11:3A:B7")

Check if an argument is an MD5 hash string

Description

Check if an argument is an MD5 hash string

Usage

is_md5(x)

Arguments

x

(any)
Object to check.

Value

TRUE if x is a valid MD5 hash string, FALSE otherwise.

Examples

is_md5("d41d8cd98f00b204e9800998ecf8427e")

Check if an argument is a Nano ID string

Description

Check if an argument is a Nano ID string

Usage

is_nanoid(x)

Arguments

x

(any)
Object to check.

Value

TRUE if x is a valid Nano ID string, FALSE otherwise.

Examples

is_nanoid("V1StGXR8_Z5jdHi6B-myT")

Check if an argument is an ORCID string

Description

Validates ORCID format including ISO/IEC 7064:2003, MOD 11-2 check digit verification.

Usage

is_orcid(x)

Arguments

x

(any)
Object to check.

Value

TRUE if x is a valid ORCID string, FALSE otherwise.

References

https://support.orcid.org/hc/en-us/articles/360006897674-Structure-of-the-ORCID-Identifier

Examples

is_orcid("0000-0002-1825-0097")

Check if an argument is a valid SEDOL string

Description

Validates SEDOL format including weighted check digit verification.

Usage

is_sedol(x)

Arguments

x

(any)
Object to check.

Value

TRUE if x is a valid SEDOL string, FALSE otherwise.

References

https://en.wikipedia.org/wiki/SEDOL

Examples

is_sedol("0263494")

Check if an argument is a semantic versioning string

Description

Validates semantic versioning 2.0.0 format, including optional pre-release and build metadata. Uses the official recommended regex from https://semver.org/.

Usage

is_semver(x)

Arguments

x

(any)
Object to check.

Value

TRUE if x is a valid semver string, FALSE otherwise.

References

https://semver.org/

Examples

is_semver("1.0.0")

Check if an argument is a SHA-256 hash string

Description

Check if an argument is a SHA-256 hash string

Usage

is_sha256(x)

Arguments

x

(any)
Object to check.

Value

TRUE if x is a valid SHA-256 hash string, FALSE otherwise.

Examples

is_sha256("e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855")

Check if an argument is a ULID string

Description

Check if an argument is a ULID string

Usage

is_ulid(x)

Arguments

x

(any)
Object to check.

Value

TRUE if x is a valid ULID string, FALSE otherwise.

References

https://github.com/ulid/spec

Examples

is_ulid("01ARZ3NDEKTSV4RRFFQ69G5FAV")

Check if an argument is url string

Description

Check if an argument is url string

Usage

is_url(x)

Arguments

x

(any)
Object to check.

Value

TRUE if x is a valid URL string, FALSE otherwise.

Examples

is_url("https://example.com")

Check if an argument is an UUID string

Description

Check if an argument is an UUID string

Usage

is_uuid(x)

Arguments

x

(any)
Object to check.

Value

TRUE if x is a valid UUID string, FALSE otherwise.

Examples

is_uuid("550e8400-e29b-41d4-a716-446655440000")