convert string to int for7 seg led display.

Hi All, I have just got a 4 digit7seg led display. I made a shield to run this from my arduino and used Dean Readings sevseg.h library.After some playing with the digit and segment pin configuration I have it working great running a counter but what I want it to do is to receive a 4 digit serial string and display it.
The problem I am having is changing the string to an int to display it.
Looking at the sevseg.h file I thought it would display a string but I must have something wrong.
Any help would be greatly appreciated.
This is the program i am trying to use!
Sorry for all the text.

Thanks in advance. Gav.

#include <SevSeg.h>
#include <Wire.h>
SevSeg sevseg;
char stringa[10];
char newstr[5];
int i = 0;
void setup() {
Serial.begin(9600);
byte numDigits = 4;
byte digitPins[] = {13, 10, 9, 7};
byte segmentPins[] = {12, 8, 5, 3, 2, 11, 6, 4};
sevseg.begin(COMMON_CATHODE, numDigits, digitPins, segmentPins);
sevseg.setBrightness(1);
}
void loop() {
// Read line from Serial
memset(stringa, 0, sizeof(stringa)); // set string contents to zero
Serial.setTimeout(500); // second input timeout
i = Serial.readBytesUntil('\n', stringa, sizeof(stringa)-1); // Read line of input
stringa.toCharArray(newstr,5); //convert the String 'command' into the char array
int delayT = atoi(newstr); //convert the char array into integer
if(i > 0) { // Display line if anything was read
sevseg.setNumber(delayT), 0);
}
}

This is the errors I am getting when trying to verify.

Arduino: 1.8.0 (Windows 7), Board: "Arduino/Genuino Uno"

C:\Users\Gavin\Documents\Arduino\LED_owners\LED_owners.ino: In function 'void loop()':

LED_owners:21: error: request for member 'toCharArray' in 'stringa', which is of non-class type 'char [10]'

stringa.toCharArray(newstr,5); //convert the String 'command' into the char array

^

LED_owners:24: error: no matching function for call to 'SevSeg::setNumber(int&)'

sevseg.setNumber(delayT), 0);

^

C:\Users\Gavin\Documents\Arduino\LED_owners\LED_owners.ino:24:27: note: candidates are:

In file included from C:\Users\Gavin\Documents\Arduino\LED_owners\LED_owners.ino:1:0:

C:\Users\Gavin\Documents\Arduino\libraries\SevSeg-master/SevSeg.h:57:8: note: void SevSeg::setNumber(long int, byte)

void setNumber(long numToShow, byte decPlaces);

^

C:\Users\Gavin\Documents\Arduino\libraries\SevSeg-master/SevSeg.h:57:8: note: candidate expects 2 arguments, 1 provided

C:\Users\Gavin\Documents\Arduino\libraries\SevSeg-master/SevSeg.h:58:8: note: void SevSeg::setNumber(long unsigned int, byte)

void setNumber(unsigned long numToShow, byte decPlaces);

^

C:\Users\Gavin\Documents\Arduino\libraries\SevSeg-master/SevSeg.h:58:8: note: candidate expects 2 arguments, 1 provided

C:\Users\Gavin\Documents\Arduino\libraries\SevSeg-master/SevSeg.h:59:8: note: void SevSeg::setNumber(int, byte)

void setNumber(int numToShow, byte decPlaces);

^

C:\Users\Gavin\Documents\Arduino\libraries\SevSeg-master/SevSeg.h:59:8: note: candidate expects 2 arguments, 1 provided

C:\Users\Gavin\Documents\Arduino\libraries\SevSeg-master/SevSeg.h:60:8: note: void SevSeg::setNumber(unsigned int, byte)

void setNumber(unsigned int numToShow, byte decPlaces);

^

C:\Users\Gavin\Documents\Arduino\libraries\SevSeg-master/SevSeg.h:60:8: note: candidate expects 2 arguments, 1 provided

C:\Users\Gavin\Documents\Arduino\libraries\SevSeg-master/SevSeg.h:61:8: note: void SevSeg::setNumber(char, byte)

void setNumber(char numToShow, byte decPlaces);

^

C:\Users\Gavin\Documents\Arduino\libraries\SevSeg-master/SevSeg.h:61:8: note: candidate expects 2 arguments, 1 provided

C:\Users\Gavin\Documents\Arduino\libraries\SevSeg-master/SevSeg.h:62:8: note: void SevSeg::setNumber(byte, byte)

void setNumber(byte numToShow, byte decPlaces);

^

C:\Users\Gavin\Documents\Arduino\libraries\SevSeg-master/SevSeg.h:62:8: note: candidate expects 2 arguments, 1 provided

C:\Users\Gavin\Documents\Arduino\libraries\SevSeg-master/SevSeg.h:63:8: note: void SevSeg::setNumber(float, byte)

void setNumber(float numToShow, byte decPlaces);

^

C:\Users\Gavin\Documents\Arduino\libraries\SevSeg-master/SevSeg.h:63:8: note: candidate expects 2 arguments, 1 provided

exit status 1
request for member 'toCharArray' in 'stringa', which is of non-class type 'char [10]'

Please use code tags (</> button on the toolbar) when you post code or warning/error messages. The reason is that the forum software can interpret parts of your code as markup, leading to confusion, wasted time, and a reduced chance for you to get help with your problem. This will also make it easier to read your code and to copy it to the IDE or editor. Using code tags and other important information is explained in the How to use this forum post. Please read it.

Please always do a Tools > Auto Format on your code before posting it. This will make it easier for you to spot bugs and make it easier for us to read.

The problem you're having is you're confusing C strings(null terminated char array) with Strings. toCharArray() is for use with String but stringa is a string. Converting a string to an int can be done using atoi:
http://www.cplusplus.com/reference/cstdlib/atoi/
or strtol:
http://www.cplusplus.com/reference/cstdlib/strtol

char stringa[10];
stringa.toCharArray(newstr,5); //convert the String 'command' into the char array

Why exactly do you think you need to convert a char array into a char array?

i = Serial.readBytesUntil('\n', stringa, sizeof(stringa)-1); // Read line of input

i can only hold two bytes. I don't think readBytesUntil is the best function here. IF you want an int and don't m ind the function blocking until it gets it then use Serial.parseInt.