Skip to content

accept any case of boolean strings#518

Merged
tphoney merged 1 commit intopuppetlabs:masterfrom
logicminds:case_insensitive
Sep 9, 2015
Merged

accept any case of boolean strings#518
tphoney merged 1 commit intopuppetlabs:masterfrom
logicminds:case_insensitive

Conversation

@logicminds
Copy link
Copy Markdown
Contributor

  • previously the str2bool function did not accept 'TRUE' as a bool
    type. This causes the function to now accept TRUE | FALSE strings
    as a boolean type in order to be converted to a proper boolean.
  • This would also cause Y, N, YES, NO to be accepted as boolean types
    as well.

@DavidS
Copy link
Copy Markdown
Contributor

DavidS commented Sep 4, 2015

Hi Corey, this looks really useful!

Please add a short note to the description of the function in the README.

Cheers, David

  * previously the str2bool function did not accept 'TRUE' as a bool
    type.  This causes the function to now accept TRUE, FALSE strings
    as a boolean type in order to be converted to a proper boolean.
  * This would also cause Y,N, YES, NO to be accepted as boolean types
    as well.
@logicminds
Copy link
Copy Markdown
Contributor Author

Just updated the README and function description.

tphoney added a commit that referenced this pull request Sep 9, 2015
accept any case of boolean strings
@tphoney tphoney merged commit 2a7a93f into puppetlabs:master Sep 9, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants