is_string_value: Checks if the passed value is a single string.

View source: R/string_value.R

is_string_valueR Documentation

Checks if the passed value is a single string.

Description

Checks if the passed value is a single string.

Usage

is_string_value(
  value,
  allow_empty = TRUE,
  allow_na = FALSE,
  allow_null = FALSE
)

Arguments

value

the value to verify

allow_empty

If TRUE (default) accept an empty string. If FALSE, don't

allow_na

If TRUE, accepts a single NA value. If FALSE (default) don't

allow_null

If TRUE, accepts a single NULL value. If FALSE (default) don't

Examples

## Not run: 
# For assertion
assertthat::assert_that(qscheck::is_string_value(my_parameter))
# For check
if (qscheck::is_string_value(my_parameter)) {}

## End(Not run)


AstraZeneca/qscheck documentation built on Nov. 1, 2023, 4:45 a.m.