dtutils.string on darktable lua documentation https://elstoc.github.io/luadocs/lua.scripts.api.manual/dtutils.string/ Recent content in dtutils.string on darktable lua documentation Hugo -- gohugo.io en-us details https://elstoc.github.io/luadocs/lua.scripts.api.manual/dtutils.string/details/ Mon, 01 Jan 0001 00:00:00 +0000 https://elstoc.github.io/luadocs/lua.scripts.api.manual/dtutils.string/details/ 🔗DTUTILS.STRING 🔗NAME dtutils.string 🔗SYNOPSIS a library of string utilities for use in darktable lua scripts 🔗USAGE local ds = require "lib/dtutils.string" 🔗DESCRIPTION This library contains string manipulation routines to aid in building darktable lua scripts. 🔗RETURN VALUE ds - library - the darktable lua string library 🔗FUNCTIONS 🔗escape_xml_characters escape characters for xml documents 🔗is_not_sanitized check if a string has been sanitized 🔗sanitize surround a string in quotes making it safe to pass as an argument escape_xml_characters https://elstoc.github.io/luadocs/lua.scripts.api.manual/dtutils.string/escape_xml_characters/ Mon, 01 Jan 0001 00:00:00 +0000 https://elstoc.github.io/luadocs/lua.scripts.api.manual/dtutils.string/escape_xml_characters/ 🔗NAME escape_xml_characters 🔗SYNOPSIS escape characters for xml documents 🔗USAGE local ds = require "lib/dtutils.string" local result = ds.escape_xml_characters(str) str - string - the string that needs escaped 🔗DESCRIPTION escape_xml_characters provides the escape sequences for "&", '"', "'", "<", and ">" with the corresponding "&",""", "'", "<", and ">" . 🔗RETURN VALUE result - string - the string containing escapes for the xml characters 🔗REFERENCE https://stackoverflow.com/questions/1091945/what-characters-do-i-need-to-escape-in-xml-documents is_not_sanitized https://elstoc.github.io/luadocs/lua.scripts.api.manual/dtutils.string/is_not_sanitized/ Mon, 01 Jan 0001 00:00:00 +0000 https://elstoc.github.io/luadocs/lua.scripts.api.manual/dtutils.string/is_not_sanitized/ 🔗NAME is_not_sanitized 🔗SYNOPSIS Check if a string has been sanitized 🔗USAGE local ds = require "lib/dtutils.string" local result = ds.is_not_sanitized(str) str - string - the string that needs to be made safe 🔗DESCRIPTION is_not_sanitized checks a string to see if it has been made safe use passing as an argument in a system command. 🔗RETURN VALUE result - boolean - true if the string is not sanitized otherwise false sanitize https://elstoc.github.io/luadocs/lua.scripts.api.manual/dtutils.string/sanitize/ Mon, 01 Jan 0001 00:00:00 +0000 https://elstoc.github.io/luadocs/lua.scripts.api.manual/dtutils.string/sanitize/ 🔗NAME sanitize 🔗SYNOPSIS surround a string in quotes making it safe to pass as an argument 🔗USAGE local ds = require "lib/dtutils.string" local result = ds.sanitize(str) str - string - the string that needs to be made safe 🔗DESCRIPTION sanitize converts a string into a version suitable for use passing as an argument in a system command. 🔗RETURN VALUE result - string - a websafe string sanitize_lua https://elstoc.github.io/luadocs/lua.scripts.api.manual/dtutils.string/sanitize_lua/ Mon, 01 Jan 0001 00:00:00 +0000 https://elstoc.github.io/luadocs/lua.scripts.api.manual/dtutils.string/sanitize_lua/ 🔗NAME sanitize_lua 🔗SYNOPSIS escape lua ‘magic’ characters from a pattern string 🔗USAGE local ds = require "lib/dtutils.string" local result = ds.sanitize_lua(str) str - string - the string that needs to be made safe 🔗DESCRIPTION sanitize_lua escapes lua ‘magic’ characters so that a string may be used in lua string/patten matching. 🔗RETURN VALUE result - string - a lua pattern safe string strip_accents https://elstoc.github.io/luadocs/lua.scripts.api.manual/dtutils.string/strip_accents/ Mon, 01 Jan 0001 00:00:00 +0000 https://elstoc.github.io/luadocs/lua.scripts.api.manual/dtutils.string/strip_accents/ 🔗NAME strip_accents 🔗SYNOPSIS strip accents from characters 🔗USAGE local ds = require "lib/dtutils.string" local result = ds.strip_accents(str) str - string - the string with characters that need accents removed 🔗DESCRIPTION strip_accents removes accents from accented characters returning the unaccented character. 🔗RETURN VALUE result - string - the string containing unaccented characters 🔗REFERENCE Copied from https://forums.coronalabs.com/topic/43048-remove-special-characters-from-string/ urlencode https://elstoc.github.io/luadocs/lua.scripts.api.manual/dtutils.string/urlencode/ Mon, 01 Jan 0001 00:00:00 +0000 https://elstoc.github.io/luadocs/lua.scripts.api.manual/dtutils.string/urlencode/ 🔗NAME urlencode 🔗SYNOPSIS encode a string in a websage manner 🔗USAGE local ds = require "lib/dtutils.string" local result = ds.urlencode(str) str - string - the string that needs to be made websafe 🔗DESCRIPTION urlencode converts a string into a websafe version suitable for use in a web browser. 🔗RETURN VALUE result - string - a websafe string 🔗REFERENCE https://forums.coronalabs.com/topic/43048-remove-special-characters-from-string