Need help with function, which will used like string.sub, but will save color part of string
-- namespaces:
local stringf;
-- @class stringf
-- @desc string helper functions
stringf = {}; do
-- @private
local str = "\affffffffSample \aff8080ffText";
-- @public
-- @param {string} s Some Text
-- @param {number} f How much to extract the string, float value from [0.0 - 1.0]
-- @desc Extracting piece of text with saving hex colors
function stringf:sub_hex(s, f)
-- ...
end
-- @region Testing
print(stringf:sub_hex(str, .5)); -- \affffffffSample
print(stringf:sub_hex(str, .9)); -- \affffffffSample \aff8080ffTe
end