Fix reversed getLength and getText examples

Title says it all. The getLength and getText api examples are swapped, this is to correct that.