Add StringBuilder Span-based APIs (#13163)
Add StringBuilder Span-based APIs (#13163)

* Add StringBuilder Span-based APIs

* Factorized ThreadSafeCopy methods

The char[] based one was called only by CopyTo so it wasn't needed anymore. Replaced by a Span based version

* Fix possible overflow

hseok-oh/coreclr,kyulee1/coreclr,JonHanna/coreclr,cydhaselton/coreclr,cshung/coreclr,tijoytom/coreclr,JosephTremoulet/coreclr,JonHanna/coreclr,JosephTremoulet/coreclr,wtgodbe/coreclr,ruben-ayrapetyan/coreclr,russellhadley/coreclr,mmitche/coreclr,krk/coreclr,parjong/coreclr,rartemev/coreclr,kyulee1/coreclr,poizan42/coreclr,mskvortsov/coreclr,rartemev/coreclr,krk/coreclr,parjong/coreclr,rartemev/coreclr,krk/coreclr,hseok-oh/coreclr,AlexGhiondea/coreclr,ruben-ayrapetyan/coreclr,krk/coreclr,AlexGhiondea/coreclr,hseok-oh/coreclr,russellhadley/coreclr,tijoytom/coreclr,kyulee1/coreclr,AlexGhiondea/coreclr,cydhaselton/coreclr,tijoytom/coreclr,JonHanna/coreclr,tijoytom/coreclr,rartemev/coreclr,cydhaselton/coreclr,cydhaselton/coreclr,rartemev/coreclr,JonHanna/coreclr,JonHanna/coreclr,hseok-oh/coreclr,tijoytom/coreclr,dpodder/coreclr,AlexGhiondea/coreclr,botaberg/coreclr,poizan42/coreclr,mskvortsov/coreclr,cshung/coreclr,wateret/coreclr,hseok-oh/coreclr,wateret/coreclr,krk/coreclr,AlexGhiondea/coreclr,yizhang82/coreclr,dpodder/coreclr,ruben-ayrapetyan/coreclr,botaberg/coreclr,poizan42/coreclr,mmitche/coreclr,yizhang82/coreclr,yizhang82/coreclr,rartemev/coreclr,wtgodbe/coreclr,botaberg/coreclr,parjong/coreclr,parjong/coreclr,wtgodbe/coreclr,wtgodbe/coreclr,JosephTremoulet/coreclr,mskvortsov/coreclr,poizan42/coreclr,mmitche/coreclr,poizan42/coreclr,russellhadley/coreclr,mmitche/coreclr,ruben-ayrapetyan/coreclr,mskvortsov/coreclr,hseok-oh/coreclr,mmitche/coreclr,ruben-ayrapetyan/coreclr,wateret/coreclr,russellhadley/coreclr,yizhang82/coreclr,cydhaselton/coreclr,wtgodbe/coreclr,dpodder/coreclr,botaberg/coreclr,kyulee1/coreclr,cshung/coreclr,botaberg/coreclr,parjong/coreclr,wateret/coreclr,kyulee1/coreclr,mmitche/coreclr,mskvortsov/coreclr,russellhadley/coreclr,JonHanna/coreclr,yizhang82/coreclr,mskvortsov/coreclr,wateret/coreclr,JosephTremoulet/coreclr,dpodder/coreclr,cshung/coreclr,cshung/coreclr,JosephTremoulet/coreclr,wateret/coreclr,dpodder/coreclr,yizhang82/coreclr,tijoytom/coreclr,ruben-ayrapetyan/coreclr,JosephTremoulet/coreclr,wtgodbe/coreclr,AlexGhiondea/coreclr,poizan42/coreclr,botaberg/coreclr,russellhadley/coreclr,dpodder/coreclr,krk/coreclr,cydhaselton/coreclr,kyulee1/coreclr,cshung/coreclr,parjong/coreclr