NAME

FFI::Go::String - A String as far as Go knows it.

VERSION

version 0.03

SYNOPSIS

use FFI::Go::String;

my $gostring = FFI::Go::String->new("foo\0bar");
my $perl_string = $gostring->to_string; # comes back as "foo\0bar"

DESCRIPTION

This class implements a Go string in Perl, and can be used when calling Go code via FFI::Platypus (see FFI::Platypus::Lang::Go for more details).

CONSTRUCTOR

new

my $gostring = FFI::Go::String->new($perl_string);

Creates a new Go string with a copy of the original Perl string.

to_string

my $perl_string = $gostring->to_string;
my $perl_string = "$gostring";

Creates a new Perl string as a copy of the original Go string.

SEE ALSO

FFI::Platypus
FFI::Platypus::Lang::Go

AUTHOR

Author: Graham Ollis <plicease@cpan.org>

Contributors:

Graham TerMarsch (GTERMARS)

COPYRIGHT AND LICENSE

This software is copyright (c) 2018-2022 by Graham Ollis.

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