How to compare a string to read cs properly?Extract number from string and compare problemString comparison in ifthenelseifthenelse equal string comparison failsConvert numbers in string to stringUse item as a string in comparisonString comparisonUnexpanded string replaceLess-than string comparison like ifstrequalString manipulation in xstringTrying to get zap@space and lowercase to work on string comparison

When a wind turbine does not produce enough electricity how does the power company compensate for the loss?

Can we track matter through time by looking at different depths in space?

Professor forcing me to attend a conference, I can't afford even with 50% funding

how to modify custom status text color in UI component grid magento 2?

What will happen if my luggage gets delayed?

Is a piano played in the same way as a harmonium?

What are some noteworthy "mic-drop" moments in math?

Doesn't allowing a user mode program to access kernel space memory and execute the IN and OUT instructions defeat the purpose of having CPU modes?

Is it possible that a question has only two answers?

How do we create new idioms and use them in a novel?

Getting the || sign while using Kurier

Can I use a violin G string for D?

Why is there an extra space when I type "ls" in the Desktop directory?

Called into a meeting and told we are being made redundant (laid off) and "not to share outside". Can I tell my partner?

Why aren't there more Gauls like Obelix?

Are all players supposed to be able to see each others' character sheets?

Power Strip for Europe

Can one live in the U.S. and not use a credit card?

How to write a chaotic neutral protagonist and prevent my readers from thinking they are evil?

What is better: yes / no radio, or simple checkbox?

How many characters using PHB rules does it take to be able to have access to any PHB spell at the start of an adventuring day?

What materials can be used to make a humanoid skin warm?

What ability score modifier does a javelin's damage use?

Windows Server Datacenter Edition - Unlimited Virtual Machines



How to compare a string to read cs properly?


Extract number from string and compare problemString comparison in ifthenelseifthenelse equal string comparison failsConvert numbers in string to stringUse item as a string in comparisonString comparisonUnexpanded string replaceLess-than string comparison like ifstrequalString manipulation in xstringTrying to get zap@space and lowercase to work on string comparison













0















The scenario: reading a date in a yyyy-mm-dd form from a file to a cs. This cs later gets compared to a 'current date' macro to write a few args in a specific way to an external file. The current day macro is along the lines of



% defTODAY
% defTodaytheyear-TwoDigitsthemonth-TwoDigitstheday
defTODAYxdefTodaytheyear-TwoDigitsthemonth-TwoDigitstheday


This works for the labeling things, since refyyyy-mm-dd works as intended. Having no extra TODAY and then using def'd Today does so to, it's the comparison that's not working. etoolbox's ifstrequal is not what I used before. Whenever the date would change I used a single xdef and later passed that macro to a ifx, and to get it to work I had to define the date with a appended. edit Read to my amazement inserts a single space after whatever's been read.



Currently I'm supposedly fixing things, but I broke it somehow, and now it doesn't match at all. The first culprit was the my TwoDigits cmd was robust, changing it back to def instead of NewDocumentCommand fixed that. The latter is for user-level commands, so I'll let that slip. But the results of the mwe are not clear to me.



0.txt contains one line with 2001-01-01 and a line new afterwards, as if one line had been written to it and the output had been closed.



The questions:



  1. What the 'right' way to compare things (macro, cs, command?) are that (should) expand to strings?

  2. Why don't edef, xdef work here, I thought it was a full expansion, and indeed before (my version control is nigh absent so I can't give a mwe for this) it worked.

  3. What is the significance of robustness? Is there a simple rule of thumb when it's necessary, obligatory, or irrelevant?

  4. It working with xstring's IfStrEqual only if the is inserted in the definition of datemacro, rather than in the comparison's brackets, i.e., datemacro . Why?


  5. ifstrequal supposedly doesn't expand- I used once in a command to test if an arguments is equal to &, this works- is #1 becoming whatever was input not count as an expansion?

example 1;



documentclassarticle
usepackage[top=1.5cm, bottom=0.6cm, hmargin=1.5cm]geometry
usepackageetoolbox
newreadperiods
openinperiods=0.txt
begindocumentsetlengthparindent0ptfontsize2020selectfont
deftesti2001-01-01
edeftestii2001-01-01
deftestiii2001-01-01
edeftestiiii2001-01-01
globalreadperiods to DDD

ifstrequaltesti2001-01-01T\F\% F
ifstrequaltestii2001-01-01T\F\% F
ifstrequaltestiii2001-01-01T\F\% F
ifstrequaltestiiii2001-01-01T\F\% F
ifstrequalDDD2001-01-01T\F\% F

ifstrequaltestiDDDT\F\% F
ifstrequaltestiiDDDT\F\% F
ifstrequaltestiiiDDDT\F\% F
ifstrequaltestiiiiDDDT\F\% F
ifstrequalDDDDDDT\F\% T

ifxtesti2001-01-01 T\else F\fi% F
ifxtestii2001-01-01 T\else F\fi% F
ifxtestiii2001-01-01 T\else F\fi% F
ifxtestiiii2001-01-01 T\else F\fi% F
ifxDDD2001-01-01 T\else F\fi% F

ifxtestiDDD T\else F\fi% F
ifxtestiiDDD T\else F\fi% F
ifxtestiiiDDD T\else F\fi% F
ifxtestiiiiDDD T\else F\fi% F
ifxDDDDDD T\else F\fi% F

ifcsequaltestiDDDT\F\% F
ifcsequaltestiiDDDT\F\% F
ifcsequaltestiiiDDDT\F\% F
ifcsequaltestiiiiDDDT\F\% F
ifcsequalDDDDDDT\F\% F

ifdefequaltestiDDDT\F\% F
ifdefequaltestiiDDDT\F\% F
ifdefequaltestiiiDDDT\F\% T
ifdefequaltestiiiiDDDT\F\% T
ifdefequalDDDDDDT\F\% T
enddocument


example 2;



documentclassarticle
usepackage[top=1.5cm, bottom=0.6cm, hmargin=1.5cm]geometry
usepackageetoolbox,xstring
defTwoDigits#1ifnum#1<10 0#1else#1fi

newcountmonth
month 1relax
newcountday
day 1relax
newreadperiods
openinperiods=0.txt
globalreadperiods to DDD

deftesti2001-TwoDigitsthemonth-TwoDigitstheday%
edeftestii2001-TwoDigitsthemonth-TwoDigitstheday%
deftestiii2001-TwoDigitsthemonth-TwoDigitstheday %
edeftestiiii2001-TwoDigitsthemonth-TwoDigitstheday %

begindocumentsetlengthparindent0pt
DDD is DDD.% space between cs and .

ifstrequaltesti2001-01-01T\F\% F
ifstrequaltestii2001-01-01T\F\% F
ifstrequaltestiii2001-01-01T\F\% F
ifstrequaltestiiii2001-01-01T\F\% F
ifstrequalDDD2001-01-01T\F\% F

ifstrequaltestiDDDT\F\% F
ifstrequaltestiiDDDT\F\% F
ifstrequaltestiiiDDDT\F\% F
ifstrequaltestiiiiDDDT\F\% F
ifstrequalDDDDDDT\F\% T

ifxtesti2001-01-01 T\else F\fi% F
ifxtestii2001-01-01 T\else F\fi% F
ifxtestiii2001-01-01 T\else F\fi% F
ifxtestiiii2001-01-01 T\else F\fi% F
ifxDDD2001-01-01 T\else F\fi% F

ifxtestiDDD T\else F\fi% F
ifxtestiiDDD T\else F\fi% F
ifxtestiiiDDD T\else F\fi% F
ifxtestiiiiDDD T\else F\fi% T
ifxDDDDDD T\else F\fi% T

ifcsequaltestiDDDT\F\% F
ifcsequaltestiiDDDT\F\% F
ifcsequaltestiiiDDDT\F\% F
ifcsequaltestiiiiDDDT\F\% F
ifcsequalDDDDDDT\F\% F

ifdefequaltestiDDDT\F\% F
ifdefequaltestiiDDDT\F\% F
ifdefequaltestiiiDDDT\F\% F
ifdefequaltestiiiiDDDT\F\% T
ifdefequalDDDDDDT\F\% T

IfStrEqtestiDDDT\F\% F
IfStrEqtestiiDDDT\F\% F
IfStrEqtesti DDDT\F\% F
IfStrEqtestii DDDT\F\% F
IfStrEqtestiiiDDDT\F\% T
IfStrEqtestiiiiDDDT\F\% T
IfStrEqDDDDDDT\F\% T

enddocument








share


























    0















    The scenario: reading a date in a yyyy-mm-dd form from a file to a cs. This cs later gets compared to a 'current date' macro to write a few args in a specific way to an external file. The current day macro is along the lines of



    % defTODAY
    % defTodaytheyear-TwoDigitsthemonth-TwoDigitstheday
    defTODAYxdefTodaytheyear-TwoDigitsthemonth-TwoDigitstheday


    This works for the labeling things, since refyyyy-mm-dd works as intended. Having no extra TODAY and then using def'd Today does so to, it's the comparison that's not working. etoolbox's ifstrequal is not what I used before. Whenever the date would change I used a single xdef and later passed that macro to a ifx, and to get it to work I had to define the date with a appended. edit Read to my amazement inserts a single space after whatever's been read.



    Currently I'm supposedly fixing things, but I broke it somehow, and now it doesn't match at all. The first culprit was the my TwoDigits cmd was robust, changing it back to def instead of NewDocumentCommand fixed that. The latter is for user-level commands, so I'll let that slip. But the results of the mwe are not clear to me.



    0.txt contains one line with 2001-01-01 and a line new afterwards, as if one line had been written to it and the output had been closed.



    The questions:



    1. What the 'right' way to compare things (macro, cs, command?) are that (should) expand to strings?

    2. Why don't edef, xdef work here, I thought it was a full expansion, and indeed before (my version control is nigh absent so I can't give a mwe for this) it worked.

    3. What is the significance of robustness? Is there a simple rule of thumb when it's necessary, obligatory, or irrelevant?

    4. It working with xstring's IfStrEqual only if the is inserted in the definition of datemacro, rather than in the comparison's brackets, i.e., datemacro . Why?


    5. ifstrequal supposedly doesn't expand- I used once in a command to test if an arguments is equal to &, this works- is #1 becoming whatever was input not count as an expansion?

    example 1;



    documentclassarticle
    usepackage[top=1.5cm, bottom=0.6cm, hmargin=1.5cm]geometry
    usepackageetoolbox
    newreadperiods
    openinperiods=0.txt
    begindocumentsetlengthparindent0ptfontsize2020selectfont
    deftesti2001-01-01
    edeftestii2001-01-01
    deftestiii2001-01-01
    edeftestiiii2001-01-01
    globalreadperiods to DDD

    ifstrequaltesti2001-01-01T\F\% F
    ifstrequaltestii2001-01-01T\F\% F
    ifstrequaltestiii2001-01-01T\F\% F
    ifstrequaltestiiii2001-01-01T\F\% F
    ifstrequalDDD2001-01-01T\F\% F

    ifstrequaltestiDDDT\F\% F
    ifstrequaltestiiDDDT\F\% F
    ifstrequaltestiiiDDDT\F\% F
    ifstrequaltestiiiiDDDT\F\% F
    ifstrequalDDDDDDT\F\% T

    ifxtesti2001-01-01 T\else F\fi% F
    ifxtestii2001-01-01 T\else F\fi% F
    ifxtestiii2001-01-01 T\else F\fi% F
    ifxtestiiii2001-01-01 T\else F\fi% F
    ifxDDD2001-01-01 T\else F\fi% F

    ifxtestiDDD T\else F\fi% F
    ifxtestiiDDD T\else F\fi% F
    ifxtestiiiDDD T\else F\fi% F
    ifxtestiiiiDDD T\else F\fi% F
    ifxDDDDDD T\else F\fi% F

    ifcsequaltestiDDDT\F\% F
    ifcsequaltestiiDDDT\F\% F
    ifcsequaltestiiiDDDT\F\% F
    ifcsequaltestiiiiDDDT\F\% F
    ifcsequalDDDDDDT\F\% F

    ifdefequaltestiDDDT\F\% F
    ifdefequaltestiiDDDT\F\% F
    ifdefequaltestiiiDDDT\F\% T
    ifdefequaltestiiiiDDDT\F\% T
    ifdefequalDDDDDDT\F\% T
    enddocument


    example 2;



    documentclassarticle
    usepackage[top=1.5cm, bottom=0.6cm, hmargin=1.5cm]geometry
    usepackageetoolbox,xstring
    defTwoDigits#1ifnum#1<10 0#1else#1fi

    newcountmonth
    month 1relax
    newcountday
    day 1relax
    newreadperiods
    openinperiods=0.txt
    globalreadperiods to DDD

    deftesti2001-TwoDigitsthemonth-TwoDigitstheday%
    edeftestii2001-TwoDigitsthemonth-TwoDigitstheday%
    deftestiii2001-TwoDigitsthemonth-TwoDigitstheday %
    edeftestiiii2001-TwoDigitsthemonth-TwoDigitstheday %

    begindocumentsetlengthparindent0pt
    DDD is DDD.% space between cs and .

    ifstrequaltesti2001-01-01T\F\% F
    ifstrequaltestii2001-01-01T\F\% F
    ifstrequaltestiii2001-01-01T\F\% F
    ifstrequaltestiiii2001-01-01T\F\% F
    ifstrequalDDD2001-01-01T\F\% F

    ifstrequaltestiDDDT\F\% F
    ifstrequaltestiiDDDT\F\% F
    ifstrequaltestiiiDDDT\F\% F
    ifstrequaltestiiiiDDDT\F\% F
    ifstrequalDDDDDDT\F\% T

    ifxtesti2001-01-01 T\else F\fi% F
    ifxtestii2001-01-01 T\else F\fi% F
    ifxtestiii2001-01-01 T\else F\fi% F
    ifxtestiiii2001-01-01 T\else F\fi% F
    ifxDDD2001-01-01 T\else F\fi% F

    ifxtestiDDD T\else F\fi% F
    ifxtestiiDDD T\else F\fi% F
    ifxtestiiiDDD T\else F\fi% F
    ifxtestiiiiDDD T\else F\fi% T
    ifxDDDDDD T\else F\fi% T

    ifcsequaltestiDDDT\F\% F
    ifcsequaltestiiDDDT\F\% F
    ifcsequaltestiiiDDDT\F\% F
    ifcsequaltestiiiiDDDT\F\% F
    ifcsequalDDDDDDT\F\% F

    ifdefequaltestiDDDT\F\% F
    ifdefequaltestiiDDDT\F\% F
    ifdefequaltestiiiDDDT\F\% F
    ifdefequaltestiiiiDDDT\F\% T
    ifdefequalDDDDDDT\F\% T

    IfStrEqtestiDDDT\F\% F
    IfStrEqtestiiDDDT\F\% F
    IfStrEqtesti DDDT\F\% F
    IfStrEqtestii DDDT\F\% F
    IfStrEqtestiiiDDDT\F\% T
    IfStrEqtestiiiiDDDT\F\% T
    IfStrEqDDDDDDT\F\% T

    enddocument








    share
























      0












      0








      0








      The scenario: reading a date in a yyyy-mm-dd form from a file to a cs. This cs later gets compared to a 'current date' macro to write a few args in a specific way to an external file. The current day macro is along the lines of



      % defTODAY
      % defTodaytheyear-TwoDigitsthemonth-TwoDigitstheday
      defTODAYxdefTodaytheyear-TwoDigitsthemonth-TwoDigitstheday


      This works for the labeling things, since refyyyy-mm-dd works as intended. Having no extra TODAY and then using def'd Today does so to, it's the comparison that's not working. etoolbox's ifstrequal is not what I used before. Whenever the date would change I used a single xdef and later passed that macro to a ifx, and to get it to work I had to define the date with a appended. edit Read to my amazement inserts a single space after whatever's been read.



      Currently I'm supposedly fixing things, but I broke it somehow, and now it doesn't match at all. The first culprit was the my TwoDigits cmd was robust, changing it back to def instead of NewDocumentCommand fixed that. The latter is for user-level commands, so I'll let that slip. But the results of the mwe are not clear to me.



      0.txt contains one line with 2001-01-01 and a line new afterwards, as if one line had been written to it and the output had been closed.



      The questions:



      1. What the 'right' way to compare things (macro, cs, command?) are that (should) expand to strings?

      2. Why don't edef, xdef work here, I thought it was a full expansion, and indeed before (my version control is nigh absent so I can't give a mwe for this) it worked.

      3. What is the significance of robustness? Is there a simple rule of thumb when it's necessary, obligatory, or irrelevant?

      4. It working with xstring's IfStrEqual only if the is inserted in the definition of datemacro, rather than in the comparison's brackets, i.e., datemacro . Why?


      5. ifstrequal supposedly doesn't expand- I used once in a command to test if an arguments is equal to &, this works- is #1 becoming whatever was input not count as an expansion?

      example 1;



      documentclassarticle
      usepackage[top=1.5cm, bottom=0.6cm, hmargin=1.5cm]geometry
      usepackageetoolbox
      newreadperiods
      openinperiods=0.txt
      begindocumentsetlengthparindent0ptfontsize2020selectfont
      deftesti2001-01-01
      edeftestii2001-01-01
      deftestiii2001-01-01
      edeftestiiii2001-01-01
      globalreadperiods to DDD

      ifstrequaltesti2001-01-01T\F\% F
      ifstrequaltestii2001-01-01T\F\% F
      ifstrequaltestiii2001-01-01T\F\% F
      ifstrequaltestiiii2001-01-01T\F\% F
      ifstrequalDDD2001-01-01T\F\% F

      ifstrequaltestiDDDT\F\% F
      ifstrequaltestiiDDDT\F\% F
      ifstrequaltestiiiDDDT\F\% F
      ifstrequaltestiiiiDDDT\F\% F
      ifstrequalDDDDDDT\F\% T

      ifxtesti2001-01-01 T\else F\fi% F
      ifxtestii2001-01-01 T\else F\fi% F
      ifxtestiii2001-01-01 T\else F\fi% F
      ifxtestiiii2001-01-01 T\else F\fi% F
      ifxDDD2001-01-01 T\else F\fi% F

      ifxtestiDDD T\else F\fi% F
      ifxtestiiDDD T\else F\fi% F
      ifxtestiiiDDD T\else F\fi% F
      ifxtestiiiiDDD T\else F\fi% F
      ifxDDDDDD T\else F\fi% F

      ifcsequaltestiDDDT\F\% F
      ifcsequaltestiiDDDT\F\% F
      ifcsequaltestiiiDDDT\F\% F
      ifcsequaltestiiiiDDDT\F\% F
      ifcsequalDDDDDDT\F\% F

      ifdefequaltestiDDDT\F\% F
      ifdefequaltestiiDDDT\F\% F
      ifdefequaltestiiiDDDT\F\% T
      ifdefequaltestiiiiDDDT\F\% T
      ifdefequalDDDDDDT\F\% T
      enddocument


      example 2;



      documentclassarticle
      usepackage[top=1.5cm, bottom=0.6cm, hmargin=1.5cm]geometry
      usepackageetoolbox,xstring
      defTwoDigits#1ifnum#1<10 0#1else#1fi

      newcountmonth
      month 1relax
      newcountday
      day 1relax
      newreadperiods
      openinperiods=0.txt
      globalreadperiods to DDD

      deftesti2001-TwoDigitsthemonth-TwoDigitstheday%
      edeftestii2001-TwoDigitsthemonth-TwoDigitstheday%
      deftestiii2001-TwoDigitsthemonth-TwoDigitstheday %
      edeftestiiii2001-TwoDigitsthemonth-TwoDigitstheday %

      begindocumentsetlengthparindent0pt
      DDD is DDD.% space between cs and .

      ifstrequaltesti2001-01-01T\F\% F
      ifstrequaltestii2001-01-01T\F\% F
      ifstrequaltestiii2001-01-01T\F\% F
      ifstrequaltestiiii2001-01-01T\F\% F
      ifstrequalDDD2001-01-01T\F\% F

      ifstrequaltestiDDDT\F\% F
      ifstrequaltestiiDDDT\F\% F
      ifstrequaltestiiiDDDT\F\% F
      ifstrequaltestiiiiDDDT\F\% F
      ifstrequalDDDDDDT\F\% T

      ifxtesti2001-01-01 T\else F\fi% F
      ifxtestii2001-01-01 T\else F\fi% F
      ifxtestiii2001-01-01 T\else F\fi% F
      ifxtestiiii2001-01-01 T\else F\fi% F
      ifxDDD2001-01-01 T\else F\fi% F

      ifxtestiDDD T\else F\fi% F
      ifxtestiiDDD T\else F\fi% F
      ifxtestiiiDDD T\else F\fi% F
      ifxtestiiiiDDD T\else F\fi% T
      ifxDDDDDD T\else F\fi% T

      ifcsequaltestiDDDT\F\% F
      ifcsequaltestiiDDDT\F\% F
      ifcsequaltestiiiDDDT\F\% F
      ifcsequaltestiiiiDDDT\F\% F
      ifcsequalDDDDDDT\F\% F

      ifdefequaltestiDDDT\F\% F
      ifdefequaltestiiDDDT\F\% F
      ifdefequaltestiiiDDDT\F\% F
      ifdefequaltestiiiiDDDT\F\% T
      ifdefequalDDDDDDT\F\% T

      IfStrEqtestiDDDT\F\% F
      IfStrEqtestiiDDDT\F\% F
      IfStrEqtesti DDDT\F\% F
      IfStrEqtestii DDDT\F\% F
      IfStrEqtestiiiDDDT\F\% T
      IfStrEqtestiiiiDDDT\F\% T
      IfStrEqDDDDDDT\F\% T

      enddocument








      share














      The scenario: reading a date in a yyyy-mm-dd form from a file to a cs. This cs later gets compared to a 'current date' macro to write a few args in a specific way to an external file. The current day macro is along the lines of



      % defTODAY
      % defTodaytheyear-TwoDigitsthemonth-TwoDigitstheday
      defTODAYxdefTodaytheyear-TwoDigitsthemonth-TwoDigitstheday


      This works for the labeling things, since refyyyy-mm-dd works as intended. Having no extra TODAY and then using def'd Today does so to, it's the comparison that's not working. etoolbox's ifstrequal is not what I used before. Whenever the date would change I used a single xdef and later passed that macro to a ifx, and to get it to work I had to define the date with a appended. edit Read to my amazement inserts a single space after whatever's been read.



      Currently I'm supposedly fixing things, but I broke it somehow, and now it doesn't match at all. The first culprit was the my TwoDigits cmd was robust, changing it back to def instead of NewDocumentCommand fixed that. The latter is for user-level commands, so I'll let that slip. But the results of the mwe are not clear to me.



      0.txt contains one line with 2001-01-01 and a line new afterwards, as if one line had been written to it and the output had been closed.



      The questions:



      1. What the 'right' way to compare things (macro, cs, command?) are that (should) expand to strings?

      2. Why don't edef, xdef work here, I thought it was a full expansion, and indeed before (my version control is nigh absent so I can't give a mwe for this) it worked.

      3. What is the significance of robustness? Is there a simple rule of thumb when it's necessary, obligatory, or irrelevant?

      4. It working with xstring's IfStrEqual only if the is inserted in the definition of datemacro, rather than in the comparison's brackets, i.e., datemacro . Why?


      5. ifstrequal supposedly doesn't expand- I used once in a command to test if an arguments is equal to &, this works- is #1 becoming whatever was input not count as an expansion?

      example 1;



      documentclassarticle
      usepackage[top=1.5cm, bottom=0.6cm, hmargin=1.5cm]geometry
      usepackageetoolbox
      newreadperiods
      openinperiods=0.txt
      begindocumentsetlengthparindent0ptfontsize2020selectfont
      deftesti2001-01-01
      edeftestii2001-01-01
      deftestiii2001-01-01
      edeftestiiii2001-01-01
      globalreadperiods to DDD

      ifstrequaltesti2001-01-01T\F\% F
      ifstrequaltestii2001-01-01T\F\% F
      ifstrequaltestiii2001-01-01T\F\% F
      ifstrequaltestiiii2001-01-01T\F\% F
      ifstrequalDDD2001-01-01T\F\% F

      ifstrequaltestiDDDT\F\% F
      ifstrequaltestiiDDDT\F\% F
      ifstrequaltestiiiDDDT\F\% F
      ifstrequaltestiiiiDDDT\F\% F
      ifstrequalDDDDDDT\F\% T

      ifxtesti2001-01-01 T\else F\fi% F
      ifxtestii2001-01-01 T\else F\fi% F
      ifxtestiii2001-01-01 T\else F\fi% F
      ifxtestiiii2001-01-01 T\else F\fi% F
      ifxDDD2001-01-01 T\else F\fi% F

      ifxtestiDDD T\else F\fi% F
      ifxtestiiDDD T\else F\fi% F
      ifxtestiiiDDD T\else F\fi% F
      ifxtestiiiiDDD T\else F\fi% F
      ifxDDDDDD T\else F\fi% F

      ifcsequaltestiDDDT\F\% F
      ifcsequaltestiiDDDT\F\% F
      ifcsequaltestiiiDDDT\F\% F
      ifcsequaltestiiiiDDDT\F\% F
      ifcsequalDDDDDDT\F\% F

      ifdefequaltestiDDDT\F\% F
      ifdefequaltestiiDDDT\F\% F
      ifdefequaltestiiiDDDT\F\% T
      ifdefequaltestiiiiDDDT\F\% T
      ifdefequalDDDDDDT\F\% T
      enddocument


      example 2;



      documentclassarticle
      usepackage[top=1.5cm, bottom=0.6cm, hmargin=1.5cm]geometry
      usepackageetoolbox,xstring
      defTwoDigits#1ifnum#1<10 0#1else#1fi

      newcountmonth
      month 1relax
      newcountday
      day 1relax
      newreadperiods
      openinperiods=0.txt
      globalreadperiods to DDD

      deftesti2001-TwoDigitsthemonth-TwoDigitstheday%
      edeftestii2001-TwoDigitsthemonth-TwoDigitstheday%
      deftestiii2001-TwoDigitsthemonth-TwoDigitstheday %
      edeftestiiii2001-TwoDigitsthemonth-TwoDigitstheday %

      begindocumentsetlengthparindent0pt
      DDD is DDD.% space between cs and .

      ifstrequaltesti2001-01-01T\F\% F
      ifstrequaltestii2001-01-01T\F\% F
      ifstrequaltestiii2001-01-01T\F\% F
      ifstrequaltestiiii2001-01-01T\F\% F
      ifstrequalDDD2001-01-01T\F\% F

      ifstrequaltestiDDDT\F\% F
      ifstrequaltestiiDDDT\F\% F
      ifstrequaltestiiiDDDT\F\% F
      ifstrequaltestiiiiDDDT\F\% F
      ifstrequalDDDDDDT\F\% T

      ifxtesti2001-01-01 T\else F\fi% F
      ifxtestii2001-01-01 T\else F\fi% F
      ifxtestiii2001-01-01 T\else F\fi% F
      ifxtestiiii2001-01-01 T\else F\fi% F
      ifxDDD2001-01-01 T\else F\fi% F

      ifxtestiDDD T\else F\fi% F
      ifxtestiiDDD T\else F\fi% F
      ifxtestiiiDDD T\else F\fi% F
      ifxtestiiiiDDD T\else F\fi% T
      ifxDDDDDD T\else F\fi% T

      ifcsequaltestiDDDT\F\% F
      ifcsequaltestiiDDDT\F\% F
      ifcsequaltestiiiDDDT\F\% F
      ifcsequaltestiiiiDDDT\F\% F
      ifcsequalDDDDDDT\F\% F

      ifdefequaltestiDDDT\F\% F
      ifdefequaltestiiDDDT\F\% F
      ifdefequaltestiiiDDDT\F\% F
      ifdefequaltestiiiiDDDT\F\% T
      ifdefequalDDDDDDT\F\% T

      IfStrEqtestiDDDT\F\% F
      IfStrEqtestiiDDDT\F\% F
      IfStrEqtesti DDDT\F\% F
      IfStrEqtestii DDDT\F\% F
      IfStrEqtestiiiDDDT\F\% T
      IfStrEqtestiiiiDDDT\F\% T
      IfStrEqDDDDDDT\F\% T

      enddocument






      conditionals etoolbox strings xstring





      share












      share










      share



      share










      asked 3 mins ago









      vlgvlg

      1169




      1169




















          0






          active

          oldest

          votes











          Your Answer








          StackExchange.ready(function()
          var channelOptions =
          tags: "".split(" "),
          id: "85"
          ;
          initTagRenderer("".split(" "), "".split(" "), channelOptions);

          StackExchange.using("externalEditor", function()
          // Have to fire editor after snippets, if snippets enabled
          if (StackExchange.settings.snippets.snippetsEnabled)
          StackExchange.using("snippets", function()
          createEditor();
          );

          else
          createEditor();

          );

          function createEditor()
          StackExchange.prepareEditor(
          heartbeatType: 'answer',
          autoActivateHeartbeat: false,
          convertImagesToLinks: false,
          noModals: true,
          showLowRepImageUploadWarning: true,
          reputationToPostImages: null,
          bindNavPrevention: true,
          postfix: "",
          imageUploader:
          brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
          contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
          allowUrls: true
          ,
          onDemand: true,
          discardSelector: ".discard-answer"
          ,immediatelyShowMarkdownHelp:true
          );



          );













          draft saved

          draft discarded


















          StackExchange.ready(
          function ()
          StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2ftex.stackexchange.com%2fquestions%2f478835%2fhow-to-compare-a-string-to-read-cs-properly%23new-answer', 'question_page');

          );

          Post as a guest















          Required, but never shown

























          0






          active

          oldest

          votes








          0






          active

          oldest

          votes









          active

          oldest

          votes






          active

          oldest

          votes















          draft saved

          draft discarded
















































          Thanks for contributing an answer to TeX - LaTeX Stack Exchange!


          • Please be sure to answer the question. Provide details and share your research!

          But avoid


          • Asking for help, clarification, or responding to other answers.

          • Making statements based on opinion; back them up with references or personal experience.

          To learn more, see our tips on writing great answers.




          draft saved


          draft discarded














          StackExchange.ready(
          function ()
          StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2ftex.stackexchange.com%2fquestions%2f478835%2fhow-to-compare-a-string-to-read-cs-properly%23new-answer', 'question_page');

          );

          Post as a guest















          Required, but never shown





















































          Required, but never shown














          Required, but never shown












          Required, but never shown







          Required, but never shown

































          Required, but never shown














          Required, but never shown












          Required, but never shown







          Required, but never shown







          Popular posts from this blog

          Isabella Eugénie Boyer Biographie | Références | Menu de navigationmodifiermodifier le codeComparator to Compute the Relative Value of a U.S. Dollar Amount – 1774 to Present.

          Lioubotyn Sommaire Géographie | Histoire | Population | Notes et références | Liens externes | Menu de navigationlubotin.kharkov.uamodifier« Recensements et estimations de la population depuis 1897 »« Office des statistiques d'Ukraine : population au 1er janvier 2010, 2011 et 2012 »« Office des statistiques d'Ukraine : population au 1er janvier 2011, 2012 et 2013 »Informations officiellesCartes topographiquesCarte routièrem

          Mpande kaSenzangakhona Biographie | Références | Menu de navigationmodifierMpande kaSenzangakhonavoir la liste des auteursm