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: 
No. I've seen all three. Personally, I use 

```
if (!str[0])

```

Using strlen is a waste of processor time and not safe unless you can guarantee the string is terminated.
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.