INTRODUCTION
Hey! My name is Caleb and I am a ROBLOX Programmer and Developer! March 20th marks the date I release my Custom Libraries module! Please do note that the Table library is still in progress and won’t be released until late March or early April. However, the String library can be used and will still be updated!
In around January, I created a module called “LocatorMod”. Granted, it was my first publicly released module and it didn’t do so well. The modules purpose was to allow developers to quickly locate objects or viruses in their game. It worked to an extent, but I decided to change up some things, this time.
Below, you will be able to find a STRING library, as the TABLE library is currently in progress. The functions can be found below. A further explanation of the functions can be found inside of the ACTUAL module.
STRING
function String.isUnicode(str)
--> Returns if the string contains unicode (using utf8.len())
function String.startsWith(obj,lookingFor,caseSensitive)
--> Returns if the "obj" parameter starts with the "lookingFor" parameter.
--> The "caseSensitive" parameter is optional, set to true if it is case sensitive.
--> This function can be used on instances.
function String.endsWith(obj,lookingFor,caseSensitive)
--> Similar to the startsWith function, but only returns if the "obj"
--> parameter ends with the "lookingFor" parameter
--> The "caseSensitive" parameter is optional, set to true if it is case sensitive.
--> This function can be used on instances.
function String.includes(obj,lookingFor,caseSensitive)
--> Returns if the "obj" parameter includes the "lookingFor" parameter
--> The "caseSensitive" parameter is optional, set to true if it is case sensitive.
--> This function can be used on instances.
function String.titleCase(obj,optExempt)
--> Returns the titlecased version of "obj".
--> The "optExempt" parameter is optional.
--> You can make a word exempt from titleCase by separating each word in
--> the "optExempt" parameter with a ":"
--> EX:String.titleCase("hello, my string has not been titlecased","my:has")
--> Returns: "Hello, my String has Not Been Titlecased"
function String.reverseCase(obj)
--> Returns the reverse cased version of "obj".
--->EX: String.reverseCase("hELLO, tHIS is MY cool STRING")
--> Returns "Hello, This IS my COOL string"
TABLE
Coming soon
I hope this module helps with everyday instances with scripting. This is an example of a way I would use it!
local String = require(game.ServerScriptService.Documentation.String)
local Prefix = "!"
local Suffix = "?"
game.Players.PlayerAdded:Connect(function(Player)
Player.Chatted:Connect(function(message)
if String.startsWith(message,Prefix) then
print("Message started with the Prefix!")
elseif String.endsWith(message,Suffix) then
print("Message ended with the Suffix!")
elseif String.includes(message,"ROBLOX",true)
print("Message included 'ROBLOX' ")
end
end
end)
Credits:
@R3KEA → Main Developer
@lightyns → Assistant Developer
@Lukxey → Supportive Contributions
[V1] CustomLibraries - Roblox
Hope this helps! If you experience any bugs, please contact me immediately.
Signed,
R3KEA
Programmer
CustomLibraries Creator