To avoid O(n^2) char buffer copying, a “rope” node (JSRope) can be created to represent a delayed string concatenation. Concatenation (called flattening) is performed if and when a linear char array is requested. In general, ropes form a binary dag whose internal nodes are JSRope string headers with no associated char array and whose leaf nodes are linear strings.
1
gowl OP 看来纯技术话题没人感兴趣啊:)
|
2
512357301 2023-01-14 13:18:19 +08:00 via Android
v 站虽然学历不错,但是翻译成中文或许回复更多
|