//set the max character size 2,147,483,647 (10 characters) or -2,147,483,648 (11 characters)
uint32_tmaxInt32Size=10;
if(int32String->data[0]=='-'){
maxInt32Size++;
}
//if the string is bigger than the possible size return NULL and error
if(int32String->length>maxInt32Size){
arc_errno=ARC_ERRNO_DATA;
ARC_DEBUG_LOG_ERROR_WITH_VARIABLES("TEST_configType_CopyInt32Fn(type, parsedData, config), size \"%s\" was bigger or smaller than the max 2,147,483,647 or min -2,147,483,648",int32String->data);
*type=NULL;
ARC_String_Destroy(int32String);
return;
}
if(int32String->length==maxInt32Size){
charmaxint32CStr[10]="2147483647";
//offset starting index and last number if there is a negative
ARC_DEBUG_LOG_ERROR_WITH_VARIABLES("TEST_configType_CopyInt32Fn(type, parsedData, config), size \"%s\" was bigger or smaller than the max 2,147,483,647 or min -2,147,483,648",int32String->data);