split_docstring {toscutil}R Documentation

Split a docstring into a Head, Param and Tail Part

Description

Split a docstring into a head, param and tail part.

Usage

split_docstring(docstring)

Arguments

docstring

Docstring of a R function as string, i.e. as character vector of length 1.

Value

List with 3 elements: head, param and tail.

Examples

uri <- system.file("testfiles/funcs.R", package = "toscutil")
func <- "f4"
content <- readLines(uri)
docstring <- get_docstring(content, func)
split_docstring(docstring)

[Package toscutil version 2.8.0 Index]