2
2
extern crate ruru;
3
3
extern crate inflector;
4
4
5
- use ruru:: { Class , RString } ;
6
-
7
5
// // dash: kebab-case
8
6
// use inflector::cases::kebabcase::to_kebab_case;
9
7
// // underscore: snake_case
@@ -14,26 +12,28 @@ use ruru::{Class,RString};
14
12
// use inflector::cases::classcase::to_class_case;
15
13
use inflector:: Inflector ;
16
14
15
+ use ruru:: { Class , RString } ;
16
+
17
17
methods ! (
18
18
RString ,
19
19
itself,
20
20
21
- fn toSnakeCase( self ) -> RString {
22
- self . to_string( ) . to_snake_case( )
21
+ fn toSnakeCase( ) -> String {
22
+ itself . to_string( ) . to_snake_case( )
23
23
}
24
24
25
- fn toCamelCase( self ) -> RString {
26
- self . to_string( ) . to_camel_case( )
25
+ fn toCamelCase( ) -> String {
26
+ itself . to_string( ) . to_camel_case( )
27
27
}
28
28
29
- fn toClassCase( self ) -> RString {
30
- self . to_string( ) . to_class_case( )
29
+ fn toClassCase( ) -> String {
30
+ itself . to_string( ) . to_class_case( )
31
31
}
32
32
33
- fn toKebabCase( self ) -> RString {
34
- self . to_string( ) . to_kebab_case( )
33
+ fn toKebabCase( ) -> String {
34
+ itself . to_string( ) . to_kebab_case( )
35
35
}
36
- )
36
+ ) ;
37
37
38
38
#[ no_mangle]
39
39
pub extern fn initialize_string ( ) {
0 commit comments