- Solidity does not have any inbuilt function for data types conversions
You can use this oracle: https://github.com/provable-things/ethereum-api/blob/master/oraclizeAPI_0.5.sol#L1045
and the function uint2string()
also refer: https://ethereum.stackexchange.com/questions/6591/conversion-of-uint-to-string
- For concatenating two string:
pragma solidity >=0.4.0 <0.6.0;
library ConcatHelper {
function concat(bytes memory a, bytes memory b)
internal pure returns (bytes memory) {
return abi.encodePacked(a, b);
}
}
source: Solidity Basics