FFI::Go::String - A String as far as Go knows it.
version 0.02
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.
Graham Ollis <plicease@cpan.org>
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.
To install FFI::Platypus::Lang::Go, copy and paste the appropriate command in to your terminal.
cpanm
cpanm FFI::Platypus::Lang::Go
CPAN shell
perl -MCPAN -e shell install FFI::Platypus::Lang::Go
For more information on module installation, please visit the detailed CPAN module installation guide.