NAME

MarpaX::ESLIF::String - ESLIF String is any string value with encoding attribute

VERSION

version 6.0.35.1

DESCRIPTION

MarpaX::ESLIF::String is a string type wrapper that associates an encoding information to the string value. Without this wrapper, only valid perl string having the utf8 flag will be able to transport encoding information to MarpaX::ESLIF.

METHODS

MarpaX::ESLIF::String->new($string, $encoding)

my $string = 'value';
my $encoding = 'UTF-8';
my $s = MarpaX::ESLIF::String->new($string, $encoding)

$string parameter defaults to the empty string, and $encoding parameter may be undef. In the later case, MarpaX::ESLIF will know you want to say this is a string, and will guess the encoding.

$s overloads by default as if it was $string.

$s->value

Returns the string value.

$s->encoding

Returns the associated encoding.

SEE ALSO

MarpaX::ESLIF

AUTHOR

Jean-Damien Durand <jeandamiendurand@free.fr>

COPYRIGHT AND LICENSE

This software is copyright (c) 2017 by Jean-Damien Durand.

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