diff options
author | Joe <rbo@gmx.us> | 2024-05-16 20:20:20 +0200 |
---|---|---|
committer | Joe <rbo@gmx.us> | 2024-05-16 20:20:20 +0200 |
commit | 086d52d11fc23f9a8315cf6151c4c796f142c0cc (patch) | |
tree | 138b985800217bd6f2e1accae169031e956a9cb7 /src/c_utils.go | |
parent | go (diff) | |
download | hardflip-086d52d11fc23f9a8315cf6151c4c796f142c0cc.tar.gz hardflip-086d52d11fc23f9a8315cf6151c4c796f142c0cc.tar.bz2 hardflip-086d52d11fc23f9a8315cf6151c4c796f142c0cc.tar.xz hardflip-086d52d11fc23f9a8315cf6151c4c796f142c0cc.tar.zst hardflip-086d52d11fc23f9a8315cf6151c4c796f142c0cc.zip |
better, now msg buff hopefully
Diffstat (limited to '')
-rw-r--r-- | src/c_utils.go | 14 |
1 files changed, 13 insertions, 1 deletions
diff --git a/src/c_utils.go b/src/c_utils.go index 2aa3fec..8d95a77 100644 --- a/src/c_utils.go +++ b/src/c_utils.go @@ -43,7 +43,7 @@ * POSSIBILITY OF SUCH DAMAGE. * * hardflip: src/c_utils.go - * Mon Jan 29 08:56:55 2024 + * Thu May 16 09:48:25 2024 * Joe * * core funcs @@ -220,3 +220,15 @@ func c_get_secret_gpg_keyring() [][2]string { keys = append(keys, [2]string{"plain", ""}) return keys } + +// reverses a string +// can be useful somehow +// found here really thanks yazu: +// https://stackoverflow.com/questions/1752414/how-to-reverse-a-string-in-go +func c_reverse_string(str string) string { + runes := []rune(str) + for i, j := 0, len(runes) - 1; i < j; i, j = i + 1, j - 1 { + runes[i], runes[j] = runes[j], runes[i] + } + return string(runes) +} |