# stringstrings package
# Matthew Bertucci 11/18/2021 for v1.24

#include:ifthen

\thestring#*
\theresult#*

\Treatments{U-mode}{l-mode}{p-mode}{n-mode}{s-mode}{b-mode}#*
\defaultTreatments#*
\encodetoken{token}#*
\encodetoken[index]{token}#*
\decodetoken{token}#*
\decodetoken[index]{token}#*
\+#*
\?#*

\substring{string}{min}{max}#*
\substring[mode%keyvals]{string}{min}{max}#*
\caseupper{string}#*
\caseupper[mode%keyvals]{string}#*
\caselower{string}#*
\caselower[mode%keyvals]{string}#*
\solelyuppercase{string}#*
\solelyuppercase[mode%keyvals]{string}#*
\solelylowercase{string}#*
\solelylowercase[mode%keyvals]{string}#*
\changecase{string}#*
\changecase[mode%keyvals]{string}#*
\noblanks{string}#*
\noblanks[mode%keyvals]{string}#*
\nosymbolsnumerals{string}#*
\nosymbolsnumerals[mode%keyvals]{string}#*
\alphabetic{string}#*
\alphabetic[mode%keyvals]{string}#*
\capitalize{string}#*
\capitalize[mode%keyvals]{string}#*
\capitalizewords{string}#*
\capitalizewords[mode%keyvals]{string}#*
\capitalizetitle{string}#*
\capitalizetitle[mode%keyvals]{string}#*
\addlcword{word}#*
\addlcwords{word1 word2 word3 . . . }#*
\resetlcwords#*
\reversestring{string}#*
\reversestring[mode%keyvals]{string}#*
\convertchar{string}{from-char}{to-string}#*
\convertchar[mode%keyvals]{string}{from-char}{to-string}#*
\convertword{string}{from-string}{to-string}#*
\convertword[mode%keyvals]{string}{from-string}{to-string}#*
\rotateword{string}#*
\rotateword[mode%keyvals]{string}#*
\removeword{string}#*
\removeword[mode%keyvals]{string}#*
\getnextword{string}#*
\getnextword[mode%keyvals]{string}#*
\getaword{string}{n}#*
\getaword[mode%keyvals]{string}{n}#*
\rotateleadingspaces{string}#*
\rotateleadingspaces[mode%keyvals]{string}#*
\removeleadingspaces{string}#*
\removeleadingspaces[mode%keyvals]{string}#*
\stringencode{string}#*
\stringencode[mode%keyvals]{string}#*
\stringdecode{string}#*
\stringdecode[mode%keyvals]{string}#*
\gobblechar{string}#*
\gobblechar[mode%keyvals]{string}#*
\gobblechars{string}{n}#*
\gobblechars[mode%keyvals]{string}{n}#*
\retokenize{string}#*
\retokenize[mode%keyvals]{string}#*

#keyvals:\substring,\caseupper,\caselower,\solelyuppercase,\solelylowercase,\changecase,\noblanks,\nosymbolsnumerals,\alphabetic,\capitalize,\capitalizewords,\reversestring,\convertchar,\convertword,\rotateword,\removeword,\getnextword,\getaword,\rotateleadingspaces,\removeleadingspaces,\stringencode,\stringdecode
v
q
e
#endkeyvals

#keyvals:\gobblechar,\gobblechars,\retokenize
v
q
#endkeyvals

\stringlength{string}#*
\stringlength[mode%keyvals]{string}#*
\findchars{string}{match-char}#*
\findchars[mode%keyvals]{string}{match-char}#*
\findwords{string}{match-string}#*
\findwords[mode%keyvals]{string}{match-string}#*
\whereischar{string}{match-char}#*
\whereischar[mode%keyvals]{string}{match-char}#*
\whereisword{string}{match-string}#*
\whereisword[mode%keyvals]{string}{match-string}#*
\wordcount{string}#*
\wordcount[mode%keyvals]{string}#*
\getargs{string}#*
\getargs[mode%keyvals]{string}#*

#keyvals:\stringlength,\findchars,\findwords,\whereischar,\whereisword,\wordcount
v
q
#endkeyvals

#keyvals:\getargs
q
e
#endkeyvals

\isnextbyte{match-byte}{string}#*
\isnextbyte[mode%keyvals]{match-byte}{string}#*
\testmatchingchar{string}{n}{match-char}#*
\testcapitalized{string}#*
\testuncapitalized{string}#*
\testleadingalpha{string}#*
\testuppercase{string}#*
\testsolelyuppercase{string}#*
\testlowercase{string}#*
\testsolelylowercase{string}#*
\testalphabetic{string}#*

#keyvals:\isnextbyte
v
q
e
#endkeyvals

\AEsc#S
\AEscCode#S
\Acute#S
\AcuteCode#S
\AlphaCapsTreatment#S
\AlphaTreatment#S
\Angstrom#S
\AngstromCode#S
\ArchJoin#S
\ArchJoinCode#S
\BarredL#S
\BarredLCode#S
\Barredl#S
\BarredlCode#S
\BlankSpace#S
\BlankTreatment#S
\Breve#S
\BreveCode#S
\CapitalizeString#S
\Carat#S
\CaratCode#S
\Caron#S
\CaronCode#S
\Cedilla#S
\CedillaCode#S
\Circumflex#S
\CircumflexCode#S
\Copyright#S
\CopyrightCode#S
\Dagger#S
\DaggerCode#S
\Dollar#S
\DollarCode#S
\DoubleAcute#S
\DoubleAcuteCode#S
\DoubleDagger#S
\DoubleDaggerCode#S
\ESCrotate{arg}#S
\EncodedAEsc#S
\EncodedAcute#S
\EncodedAngstrom#S
\EncodedArchJoin#S
\EncodedBarredL#S
\EncodedBarredl#S
\EncodedBlankSpace#S
\EncodedBreve#S
\EncodedCarat#S
\EncodedCaron#S
\EncodedCedilla#S
\EncodedCircumflex#S
\EncodedCopyright#S
\EncodedDagger#S
\EncodedDollar#S
\EncodedDoubleAcute#S
\EncodedDoubleDagger#S
\EncodedEszett#S
\EncodedGrave#S
\EncodedLB#S
\EncodedLeftBrace#S
\EncodedLineUnder#S
\EncodedMacron#S
\EncodedOEthel#S
\EncodedOverdot#S
\EncodedPilcrow#S
\EncodedPipe#S
\EncodedPounds#S
\EncodedRB#S
\EncodedRightBrace#S
\EncodedSectionSymbol#S
\EncodedSlashedO#S
\EncodedSlashedo#S
\EncodedTilde#S
\EncodedUmlaut#S
\EncodedUnderdot#S
\EncodedUnderscore#S
\EncodedUvari#S
\EncodedUvarii#S
\EncodedUvariii#S
\Encodedaesc#S
\Encodedangstrom#S
\Encodedoethel#S
\EncodingTreatment#S
\EscapeChar#S
\Eszett#S
\EszettCode#S
\Grave#S
\GraveCode#S
\LB#S
\LBCode#S
\LeftBrace#S
\LeftBraceCode#S
\LineUnder#S
\LineUnderCode#S
\Macron#S
\MacronCode#S
\NumeralTreatment#S
\OEthel#S
\OEthelCode#S
\Overdot#S
\OverdotCode#S
\Pilcrow#S
\PilcrowCode#S
\Pipe#S
\PipeCode#S
\Pounds#S
\PoundsCode#S
\PrimarySignalChar#S
\PunctuationTreatment#S
\RB#S
\RBCode#S
\RightBrace#S
\RightBraceCode#S
\SaveAEsc#S
\SaveAcute#S
\SaveAlphaCapsTreatment#S
\SaveAlphaTreatment#S
\SaveAngstrom#S
\SaveArchJoin#S
\SaveBarredL#S
\SaveBarredl#S
\SaveBreve#S
\SaveCaron#S
\SaveCedilla#S
\SaveCircumflex#S
\SaveCopyright#S
\SaveDagger#S
\SaveDollar#S
\SaveDoubleAcute#S
\SaveDoubleDagger#S
\SaveEszett#S
\SaveGrave#S
\SaveHardspace#S
\SaveLB#S
\SaveLeftBrace#S
\SaveLineUnder#S
\SaveMacron#S
\SaveOEthel#S
\SaveOverdot#S
\SavePilcrow#S
\SavePounds#S
\SaveRB#S
\SaveRightBrace#S
\SaveSectionSymbol#S
\SaveSlashedO#S
\SaveSlashedo#S
\SaveTilde#S
\SaveUmlaut#S
\SaveUnderdot#S
\SaveUnderscore#S
\Saveaesc#S
\Saveangstrom#S
\Saveoethel#S
\SecondarySignalChar#S
\SectionSymbol#S
\SectionSymbolCode#S
\SeekBlankSpace#S
\SignalChar#S
\SlashedO#S
\SlashedOCode#S
\Slashedo#S
\SlashedoCode#S
\SymbolTreatment#S
\Tilde#S
\TildeCode#S
\Umlaut#S
\UmlautCode#S
\Underdot#S
\UnderdotCode#S
\Underscore#S
\UnderscoreCode#S
\UnencodedLB#S
\UnencodedRB#S
\Uvari#S
\UvariCode#S
\Uvarii#S
\UvariiCode#S
\Uvariii#S
\UvariiiCode#S
\aesc#S
\aescCode#S
\angstrom#S
\angstromCode#S
\buildtoken#S
\carat#S
\encodedfromarg#S
\encodedstring#S
\encodedtoarg#S
\endofstring#S
\gobbledword#S
\lcword#S
\matchchar#S
\mystring#S
\narg#S
\oethel#S
\oethelCode#S
\rotatingword#S
\ucword#S
\undecipherable#S
\uvari#S
\uvarii#S
\uvariii#S
\ifmatchingchar#S
\matchingchartrue#S
\matchingcharfalse#S
\ifcapitalized#S
\capitalizedtrue#S
\capitalizedfalse#S
\ifuncapitalized#S
\uncapitalizedtrue#S
\uncapitalizedfalse#S
\ifleadingalpha#S
\leadingalphatrue#S
\leadingalphafalse#S
\ifuppercase#S
\uppercasetrue#S
\uppercasefalse#S
\ifsolelyuppercase#S
\solelyuppercasetrue#S
\solelyuppercasefalse#S
\iflowercase#S
\lowercasetrue#S
\lowercasefalse#S
\ifsolelylowercase#S
\solelylowercasetrue#S
\solelylowercasefalse#S
\ifalphabetic#S
\alphabetictrue#S
\alphabeticfalse#S