help@rskworld.in +91 93305 39277
RSK World
  • Home
  • Development
    • Web Development
    • Mobile Apps
    • Software
    • Games
    • Project
  • Technologies
    • Data Science
    • AI Development
    • Cloud Development
    • Blockchain
    • Cyber Security
    • Dev Tools
    • Testing Tools
  • About
  • Contact

Theme Settings

Color Scheme
Display Options
Font Size
100%
Back to Project
RSK World
go-cli-tool
/
internal
/
textproc
RSK World
go-cli-tool
Go CLI Tool v3.0 - Command-Line Interface with File Operations + Text Processing + System Monitoring + Cryptographic Tools + Network Utilities + HTTP Client + Image Processing + Cross-Platform Support + Modern Go Development
textproc
  • text.go1.6 KB
text.go
internal/textproc/text.go
Raw Download
Find: Go to:
/*
 * Project: Go CLI Tool
 * Category: Go Projects
 * Description: Command-line interface tool built with Go. Features file operations, text processing, command parsing, and system utilities.
 * Author: RSK World
 * Email: support@rskworld.in
 * Website: https://rskworld.in/contact.php
 * Year: 2026
 * Copyright (c) 2026 RSK World. All rights reserved.
 */

package textproc

import (
	"encoding/base64"
	"fmt"
	"strings"
)

// WordCount counts the number of words in a string
func WordCount(text string) {
	words := strings.Fields(text)
	fmt.Printf("Word count: %d\n", len(words))
}

// ToUpperCase converts text to uppercase
func ToUpperCase(text string) {
	fmt.Println(strings.ToUpper(text))
}

// ToLowerCase converts text to lowercase
func ToLowerCase(text string) {
	fmt.Println(strings.ToLower(text))
}

// ReverseText reverses the given string
func ReverseText(text string) {
	runes := []rune(text)
	for i, j := 0, len(runes)-1; i < j; i, j = i+1, j-1 {
		runes[i], runes[j] = runes[j], runes[i]
	}
	fmt.Println(string(runes))
}

// Base64Encode encodes the input string to Base64.
// Base64 is commonly used to encode binary data as safe ascii strings.
func Base64Encode(text string) {
	encoded := base64.StdEncoding.EncodeToString([]byte(text))
	fmt.Printf("Base64 Encoded: %s\n", encoded)
}

// Base64Decode decodes a Base64 string back to its original form.
func Base64Decode(text string) {
	decoded, err := base64.StdEncoding.DecodeString(text)
	if err != nil {
		fmt.Printf("Error decoding base64: %v\n", err)
		return
	}
	fmt.Printf("Base64 Decoded: %s\n", string(decoded))
}
61 lines•1.6 KB
go

About RSK World

Founded by Molla Samser, with Designer & Tester Rima Khatun, RSK World is your one-stop destination for free programming resources, source code, and development tools.

Founder: Molla Samser
Designer & Tester: Rima Khatun

Development

  • Game Development
  • Web Development
  • Mobile Development
  • AI Development
  • Development Tools

Legal

  • Terms & Conditions
  • Privacy Policy
  • Disclaimer

Contact Info

Nutanhat, Mongolkote
Purba Burdwan, West Bengal
India, 713147

+91 93305 39277

hello@rskworld.in
support@rskworld.in

© 2026 RSK World. All rights reserved.

Content used for educational purposes only. View Disclaimer