In the generated asm code:
- pointer(aString)^ will pass the string address directly to the procedure/function/method;
- aString[1] will call UniqueString then pass the string address to the procedure/function/method.
So pointer(aString)^ is to be used if you're about to read the data, not modify it.
And aString[1] is to be used if you're about to modify aString in the called function.
In practice, I use pointer(aString)^ which produces more efficient code.
Note that this implicit UniqueString is not so slow: if the current reference count of the string is 1 (which means that there is only one part of your code using the string, which is very likely), it returns immediately. But there is a LOCK asm prefix in the UniqueString used to check the reference count value, and use of this LOCK asm is not multi-thread friendly. That's why I try to avoid using aString[1] when I'm coding.
Additional note: if aString is '', pointer(aString) will return nil.