File tree Expand file tree Collapse file tree 5 files changed +56
-1
lines changed
Expand file tree Collapse file tree 5 files changed +56
-1
lines changed Original file line number Diff line number Diff line change @@ -101,6 +101,15 @@ devd convert solc_sig [event/method signature]
101101# devd c solc_sig 'event Transfer(address indexed from, address indexed to, uint256 value);'
102102```
103103
104+ #### Convert input into upper/lower case
105+
106+ ``` bash
107+ devd convert to_lower_case [input]
108+ # devd c lowercase AA
109+ devd convert to_upper_case [input]
110+ # devd c uppercase aa
111+ ```
112+
104113### Debug tools
105114
106115#### Compute EVM transaction intrinsic gas
Original file line number Diff line number Diff line change @@ -17,6 +17,8 @@ func Commands() *cobra.Command {
1717 GetConvertAbiStringCmd (),
1818 GetConvertHexadecimalToDecimalCmd (),
1919 GetConvertSolcSignatureCmd (),
20+ GetConvertToLowerCaseCmd (),
21+ GetConvertToUpperCaseCmd (),
2022 )
2123
2224 return cmd
Original file line number Diff line number Diff line change 1+ package convert
2+
3+ import (
4+ "fmt"
5+ "github.com/spf13/cobra"
6+ "strings"
7+ )
8+
9+ // GetConvertToLowerCaseCmd creates a helper command that convert input into lower case
10+ func GetConvertToLowerCaseCmd () * cobra.Command {
11+ cmd := & cobra.Command {
12+ Use : "to_lower_case [text]" ,
13+ Aliases : []string {"lowercase" },
14+ Short : "Convert input into lower case" ,
15+ Args : cobra .MinimumNArgs (1 ),
16+ Run : func (cmd * cobra.Command , args []string ) {
17+ fmt .Println (strings .ToLower (strings .Join (args , " " )))
18+ },
19+ }
20+
21+ return cmd
22+ }
Original file line number Diff line number Diff line change 1+ package convert
2+
3+ import (
4+ "fmt"
5+ "github.com/spf13/cobra"
6+ "strings"
7+ )
8+
9+ // GetConvertToUpperCaseCmd creates a helper command that convert input into upper case
10+ func GetConvertToUpperCaseCmd () * cobra.Command {
11+ cmd := & cobra.Command {
12+ Use : "to_upper_case [text]" ,
13+ Aliases : []string {"uppercase" },
14+ Short : "Convert input into upper case" ,
15+ Args : cobra .MinimumNArgs (1 ),
16+ Run : func (cmd * cobra.Command , args []string ) {
17+ fmt .Println (strings .ToUpper (strings .Join (args , " " )))
18+ },
19+ }
20+
21+ return cmd
22+ }
Original file line number Diff line number Diff line change @@ -4,5 +4,5 @@ package constants
44
55//goland:noinspection GoSnakeCaseUsage
66var (
7- VERSION = "1.2 .0"
7+ VERSION = "1.3 .0"
88)
You can’t perform that action at this time.
0 commit comments