justin = { main feed , music , code , askjf , pubkey };
Ask Justin Frankel
No reasonable question unanswered since 2009!

Suggested topics: programming, music, sleep, coffee, etc.

Note: please do not ask questions about REAPER features, bugs or scheduling, use the forums instead.


Name: Ask: Human (enter yes):
[back to index] | [unreplied] | [replied] | [recent comments] | [all]

Question: What is a WDL_FastString, i.e. why should/shouldn't one use it instead of a regular WDL_String?
Asked by Tale (77.168.115.x) on November 9 2011, 10:38am
Reply on November 9 2011, 3:37pm:
    If you need to be able to do things like:
    string.Get()[3]=x;
    
    Then you must use WDL_String. WDL_FastString makes Get() return const char *, which means all modifications have to be done through its methods. The advantage of this is that it can track the string's length, so a) string.GetLength() is constant-time, and b) appends and many other operations are faster (not needing to calculate the string's length each time).

Comment:
    Your Name:   -- Site Owner's Name:  (for human-verification)

    Comment:    

    
  
[back to index] | [unreplied] | [replied] | [recent comments] | [all]
Copyright 2025 Justin Frankel. | RSS