Jérôme Quelin
and 1 contributors

# NAME

Language::Befunge::lib::STRN - string extension

version 5.000

# DESCRIPTION

The STRN fingerprint (0x5354524E) allows to work with strings.

# FUNCTIONS

## new

Create a new STRN instance.

## I/O subroutines

D(\$str)

Print `\$str` on STDOUT.

(\$str) = I()

Input a string and push it back on the stack.

## String manipulation

(\$str) = A( \$s1, \$s2 )

Push back `\$s1 . \$s2` on the stack.

(\$cmp) = C( \$1, \$s2 )

Push back `\$s1 cmp \$s2` on the stack.

(\$str) = F( \$s1, \$s2 )

Push back the longest suffix of `\$s1` starting with `\$s2`.

(\$str) = L( \$s, \$n )

Push back on the stack `substr \$s, 0, \$n` (left of string).

(\$str) = M( \$s, \$m, \$n )

Push back on the stack `substr \$s, m, \$n` (middle of string).

(\$length) = N( \$str )

Push back `\$length` of `\$str`.

(\$str) = R( \$s, \$n )

Push back on the stack `substr \$s, -\$n` (right of string).

## Strings within storage

The following functions take the storage offset into account.

(\$str) = G( \$vec )

Read string from `\$vec`, using a velocity of (1,0, ..) till it finds a null cell. Reflects if no null cell found.

P( \$str, \$vec )

Put string `\$str` at position `\$vec`.

## Conversion functions

(\$str) = S( \$n )

Push back the string representation of `\$n`.

(\$n) = V( \$str )

Push back the numerical value of `str`.