tdenniston / bish

Bish is a language that compiles to Bash. It's designed to give shell scripting a more comfortable and modern feel.
MIT License
1.48k stars 36 forks source link

Add empty function #16

Closed egorsmkv closed 9 years ago

egorsmkv commented 9 years ago

Like the project.

While this is my small contribution. To check the string length standard means you can not use the expression ${#myVar}.

egorsmkv commented 9 years ago

The opposite is also possible to add a function. Or operator "!".

tdenniston commented 9 years ago

Doesn't it work to simply say if (str == "") { ... }?

egorsmkv commented 9 years ago

@tdenniston Yes, perhaps, is the best option.

egorsmkv commented 9 years ago

@tdenniston However, this function can be changed to obtain the length of the string, which is very convenient in different cases.

egorsmkv commented 9 years ago

@tdenniston You can close this PR.