Question: Is it possible to edit the text within a cell in datatables. So that when the user double clicks on the cell it becomes editable ?

Thanks

Answer: 
If you already know that `str` is non-null:

```
if (!*str) {
    // empty string
}

```

Otherwise:

```
if (!str || !*str) {
    // empty string
}

```

Forget about `strlen()`.
All of your examples are fine. It should be clear from the fact that all three are in your codebase that there is no "commonly agreed upon" method.