FFI::Go::String - A String as far as Go knows it.
version 0.03
use FFI::Go::String; my $gostring = FFI::Go::String->new("foo\0bar"); my $perl_string = $gostring->to_string; # comes back as "foo\0bar"
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).
my $gostring = FFI::Go::String->new($perl_string);
Creates a new Go string with a copy of the original Perl string.
my $perl_string = $gostring->to_string; my $perl_string = "$gostring";
Creates a new Perl string as a copy of the original Go string.
Author: Graham Ollis <plicease@cpan.org>
Contributors:
Graham TerMarsch (GTERMARS)
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.