Jerome Quelin > Language-Befunge > Language::Befunge::lib::STRN

Download:
Language-Befunge-4.13.tar.gz

Dependencies

Annotate this POD

Website

CPAN RT

Open  0
View/Report Bugs
Source  

NAME ^

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

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.

SEE ALSO ^

Language::Befunge, http://www.rcfunge98.com/rcsfingers.html#STRN.

AUTHOR ^

Jerome Quelin, <jquelin@cpan.org>

COPYRIGHT & LICENSE ^

Copyright (c) 2001-2009 Jerome Quelin, all rights reserved.

This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself.

syntax highlighting: