Skip to content

Commit 37ac845

Browse files
committed
Change: make a flag
1 parent 5483c3a commit 37ac845

3 files changed

Lines changed: 44 additions & 1 deletion

File tree

‎c/Snake/snake.c‎

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -228,7 +228,8 @@ void *key(void *arg) // Direction Control:w,s,a,d-->Up Down Left Right
228228
int main() {
229229
#if defined(_WIN16) || defined(_WIN32) || defined(_WIN64)
230230
#elif defined(__linux__) || defined(__gnu_linux__)
231-
system("stty -icanon"); // close lined buffer of input for no enter to capture input
231+
// close lined buffer of input for no enter to capture input
232+
system("stty -icanon");
232233
#elif defined(__APPLE__)
233234
#endif
234235
pthread_t pid;

‎c/String/README.md‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
# A custom library to simulate string operation func in golang

‎c/String/gostring.c‎

Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
// func Index(s, substr string) int
2+
// func IndexAny(s, chars string) int
3+
// func IndexByte(s string, c byte) int
4+
// func IndexFunc(s string, f func(rune) bool) int
5+
// func IndexRune(s string, r rune) int
6+
// func LastIndex(s, substr string) int
7+
// func LastIndexAny(s, chars string) int
8+
// func LastIndexByte(s string, c byte) int
9+
// func LastIndexFunc(s string, f func(rune) bool) int
10+
11+
// func TrimSpace(str string) string
12+
// func HasPrefix(s string, prefix string) bool
13+
// func HasSuffix(s string, suffix string) bool
14+
// func Index(s string, str string) int
15+
// func LastIndex(s string, str string) int
16+
// func IndexAny(s,chars string)int
17+
// func IndexByte(s string, c byte) int
18+
// func Replace(str string, old string, new string, n int)
19+
// func Title(s string) string
20+
// func ToTitle(s string) string
21+
// func ToLower(str string) string
22+
// func ToUpper(str string) string
23+
// func Contains(s, substr string) bool
24+
// func ContainsAny(s,chars string)bool
25+
// func IndexRune(s string, r rune) int
26+
// func Count(s, sep string) int
27+
// func Repeat(str string, count int)string
28+
// func Trim(str string, cut string)
29+
// func TrimLeft(str string, cut string)
30+
// func TrimRight(str string, cut string)
31+
// func TrimPrefix(S string, prefix string) string
32+
// func TrimSpace(s string) string
33+
// func Fields(str string) []string
34+
// func FieldsFunc(s string,f func(rune bool)[] string
35+
// func ContainsRune(s string, r rune) bool
36+
// func Split(str string, split string) []string
37+
// func Join(s1 []string, sep string) string
38+
// func SplitN(s, sep string, n int) []string
39+
// func SplitAfter(S String, sep string) []string
40+
// func SplitAfterN(string s, sep string, n int) []string
41+
// func func Cut(s, sep string) (before, after string, found bool)

0 commit comments

Comments
 (0)