1 /* This file is part of NIT ( http://www.nitlanguage.org ).
3 * Copyright 2011 Alexis Laferrière <alexis.laf@xymus.net>
5 * This file is free software, which comes along with NIT. This software is
6 * distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY;
7 * without even the implied warranty of MERCHANTABILITY or FITNESS FOR A
8 * PARTICULAR PURPOSE. You can modify it is you want, provided this header
9 * is kept unaltered, and a notification of the changes is added.
10 * You are allowed to redistribute it and sell it, alone or is a part of
14 #include "test_ni_strings.nit.h"
18 C implementation of test_ni_strings::A::get_str_from_nstr
20 Imported methods signatures:
21 String NativeString_to_s( char * str ) for string::NativeString::to_s
23 String
A_get_str_from_nstr___impl( A recv
, char * nstr
)
25 return NativeString_to_s( nstr
);
29 C implementation of test_ni_strings::A::get_str_from_nstr_with_len
31 Imported methods signatures:
32 String NativeString_to_s_with_length( char * nat, bigint size ) for string::NativeString::to_s_with_length
33 bigint NativeString_cstring_length( char * recv ) for string::NativeString::cstring_length
35 String
A_get_str_from_nstr_with_len___impl( A recv
, char * nstr
)
37 return NativeString_to_s_with_length( nstr
, NativeString_cstring_length( nstr
) );
41 C implementation of test_ni_strings::A::get_nstr_from_str
43 Imported methods signatures:
44 char * String_to_cstring( String recv ) for string::String::to_cstring
46 char * A_get_nstr_from_str___impl( A recv
, String str
)
48 return String_to_cstring( str
);
53 C implementation of test_ni_strings::A::get_something
55 Imported methods signatures:
56 String NativeString_to_s( char * str ) for string::NativeString::to_s
58 String
A_get_something___impl( A recv
)
60 return NativeString_to_s( "something" );