text_transform_lib
v1.0.0
Published
A simple library for text transformation using various methods, including layout switching.
Downloads
1
Readme
Text Transformer
Простая библиотека для преобразования текста с использованием различных методов.
Установка
bash npm install text_transform_lib
Использование
const textTransformer = require('text_transform_lib');
const originalText = 'Hello, World!';
const upperCaseText = textTransformer.toUpperCase(originalText); console.log(upperCaseText); // HELLO, WORLD!
const lowerCaseText = textTransformer.toLowerCase(originalText); console.log(lowerCaseText); // hello, world!
const reversedText = textTransformer.reverse(originalText); console.log(reversedText); // !dlroW ,olleH
const switchedText = textTransformer.switchLayout(originalText); console.log(switchedText); // Пример переключения раскладки
Методы
toUpperCase(text: string): string Преобразует текст в верхний регистр.
toLowerCase(text: string): string Преобразует текст в нижний регистр.
reverse(text: string): string Инвертирует порядок символов в тексте.
switchLayout(text: string): string Переключает раскладку текста между русской и английской.