This function is available only on CharStorage
.
This method resizes the storage to the length of the provided
string str
, and copy the contents of str
into the storage. The NULL
terminating character is not copied,
but str
might contain NULL
characters. The method returns the Storage
.
> x = torch.CharStorage():string("blah blah") > print(x) 98 108 97 104 32 98 108 97 104 [torch.CharStorage of size 9]