tour

package
v0.9.3 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: May 15, 2024 License: MIT Imports: 1 Imported by: 0

Documentation

Overview

Package tour provides a collection of string manipulation utilities. These utilities are designed to showcase idiomatic Go practices and offer simple, yet powerful functions for common string processing tasks.

The package currently includes the following utilities:

  • ConvertToBinary: Converts a string to its binary representation, with each Unicode character represented by its binary equivalent.

Additional functions will be documented here as they are added.

The functions in this package are intended to be examples of clean, idiomatic Go code. They are suitable for educational purposes as well as practical use in Go projects that require string manipulation.

Reasons for creating this package:

  • To provide solutions that handle strings in a way that is safe and compatible with operating system constraints, which may not manage constant strings effectively. Note: This is not a problem with Go, but rather a problem with the operating system so bad.

Index

Constants

View Source
const (
	BinaryCharHighLevel = "%08b "
)

List of constants used in the tour package.

Variables

This section is empty.

Functions

func ConvertToBinary

func ConvertToBinary(input string) string

ConvertToBinary converts a string to its binary representation. Each character of the input string is represented by its binary equivalent, separated by spaces in the resulting string.

For example:

ConvertToBinary("Go") returns "1000111 1101111"

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL