Thanks to visit codestin.com
Credit goes to github.com

Skip to content

selenter-c/findcharacters

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 

Repository files navigation

Find Characters

A simple library that contains 2 new functions to help you find only certain letters in the text, large and small. The functions that are being added:

-- This function is needed to search for SMALL characters in the text.
-- @str — String in which the search will take place.
-- Function returns 2 data:
--    1: String; (How the text will look with only small letters)
--    2: Integer; (Number of small letters)
string.findLowerCharacters(str)

-- This function is needed to search for LARGE characters in the text.
-- @str — String in which the search will take place.
-- Function returns 2 data:
--    1: String; (How the text will look with only large letters)
--    2: Integer; (Number of large letters)
string.findUpperCharacters(str)

Here are some examples of how these functions work:

local data = "Some KIND of random tyPING for an EXAMPLE!"

local lStr, lCount = string.findLowerCharacters(data)
--[[
    OUTPUT:
        omeofrandomtyforan      18
]]--

local uStr, uCount = string.findUpperCharacters(data)
--[[
    OUTPUT:
        SKINDPINGEXAMPLE        16
]]--

print(lStr, lCount)
print(uStr, uCount)
print(string.findLowerCharacters("TEST TEst"))
print(string.findUpperCharacters("test teST"))

--[[
    OUTPUT:
        st      2
        ST      2
]]--

About

Library for searching large and small letters

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages