[V1] Introducing CustomLibraries! (Extended String & Table Libraries)

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

3 Likes

Awesome module, I highly recommend this. I’ve started using it before it was launched to the public, and I’ve really been able to save a lot of time with this.

P.S. i was moral support for caleb when he made this

First of all, there is a Library extension module already with much more functionality. Plus, most of your string functions are easily possible than these custom ones.

  • startsWith is easily doing str:split('')[1] == 'x'.
  • endsWith is easily doing str:split('')[#str] == 'x'
  • includes is easily doing str:find('is this included') ~= nil

Furthermore, it would’ve been awesome if you’d merged this with the existing string library instead. Also, why announce an extended table library when it isn’t even out yet, you could’ve have to post this after it came?

It is a good resource with a good intention, but there are already so many that it’s difficult to supersede them.

Thank you for your CC. I didn’t realize there was another module that can be utilized instead of this. Guess I’ll try again with something else. :joy: