roops

package module
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Nov 4, 2019 License: MIT Imports: 0 Imported by: 0

README

RU - OOPS!

Handy string replacement for users, that forgot to switch keyboard layouts

How to use

Just invoke roops.ToLatin("руддщ") and it will produce hello. That's it. Nothing more.

PS. ToLatin works only if all characters can be converted. Partial replacements are not supported.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ToLatin

func ToLatin(src string) (res string, replaced bool)

ToLatin attempts to convert provided source string into latin characters using conversion dictionary, based on russian keyboard layout.

For example "Ащщ" will be converted into "Foo"

Conversion will be applied only if all characters inside string can be converted, so this function does not work in partial mode.

If coversion is successful, this function will return result and true. In other cases this func will return source string and false.

PS. Works on standard Windows keyboard layouts.

Types

This section is empty.

Jump to

Keyboard shortcuts

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