GSP
Quick Navigator

Search Site

Unix VPS
A - Starter
B - Basic
C - Preferred
D - Commercial
MPS - Dedicated
Previous VPSs
* Sign Up! *

Support
Contact Us
Online Help
Handbooks
Domain Status
Man Pages

FAQ
Virtual Servers
Pricing
Billing
Technical

Network
Facilities
Connectivity
Topology Map

Miscellaneous
Server Agreement
Year 2038
Credits
 

USA Flag

 

 

Man Pages


Manual Reference Pages  -  PUGS::RUNTIME::STRPOS (3)

.ds Aq ’

NAME

Pugs::Runtime::StrPos - Represent a position inside a string

CONTENTS

OPTIONAL MODULES

* YAML::Syck

- in order to support ’yaml()

METHODS

* new({ str => ..., codes => $n });

create a new StrPos object.

’str’ must be utf-8.

’codes’ can be undef, meaning nowhere in this string.

* from_str( $str )

create a new StrPos object, using the perl5-string internal ’pos’.

* from_str_graphs( $str, $graphs ) * from_str_codes( $str, $codes )

create a new StrPos object using grapheme or codepoint units.

* bytes() * codes() * graphs()

- return the position as an integer, counting in bytes, codepoints, or graphemes.

* langs()

- TODO - return the position as an integer, counting in language dependent chars.

* bool()

- test whether a position is defined.

* add_codes($n) * add_graphs($n)

- return a new StrPos with the new position

* clone

- return a new StrPos with the same position

OVERLOADS

* numeric

- return the count of graphemes, or undef.

* boolean

- test whether a position is defined. The position ’zero’ is true.

Dumper methods

* perl

- return the internal representation as Perl source code.

* yaml

- return the internal representation as YAML. Requires the YAML::Syck module.

* dump_hs

- for Pugs interoperability

SEE ALSO

v6 on CPAN

AUTHORS

The Pugs Team <perl6-compiler@perl.org>.

COPYRIGHT

Copyright 2007 by Flavio Soibelmann Glock and others.

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

See <http://www.perl.com/perl/misc/Artistic.html>

Search for    or go to Top of page |  Section 3 |  Main Index


perl v5.20.3 PUGS::RUNTIME::STRPOS (3) 2008-07-29

Powered by GSP Visit the GSP FreeBSD Man Page Interface.
Output converted with manServer 1.07.