datastring

package
v0.0.5 Latest Latest
Warning

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

Go to latest
Published: Aug 25, 2022 License: MIT Imports: 1 Imported by: 0

Documentation

Overview

Package datastring implements functions to manipulate UTF-8 encoded strings

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func InsertNewCharNthPosition

func InsertNewCharNthPosition(s string, n int, r rune) string

InsertNewCharNthPosition inserts a new UTF-8 character after every N-th character and receives the result as a UTF-8 formatted string

Example:

input := "12345678123456781234567812345678"

result := InsertNewCharNthPosition(input, 8, '-')

result will be "12345678-12345678-12345678-12345678"

Types

This section is empty.

Jump to

Keyboard shortcuts

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