GPRSLibrary - How to Store responce in string

Hi.

I’m using this Library
in order to send various sensors readings through SMS.
So far everything working fine and the library is working fine.
The problem i’m facing is that i want to store the response of the module in a variable in order to process them later in the code.
For example i want to store the network Time in a variable and later pass it to my RTC.
Unfortunately i can’t find a library function in order to store the response in rec_data variable.

Can you please help me ?

if (AT_RESP_OK == gsm.SendATCmdWaitResp("AT+CLTS=1", 500, 100, "OK", 5)) // SET MODE TO REQUEST TIME
    {
      Serial.println("Request Of Real Time From Network"); 
         
     gsm.SimpleWrite("AT+CCLK?");
     rec_data =                            <<---------------------------- ???????????
     Serial.println(rec_data);
      
    }

I've made a step forward ?!?

I've made a new function in GSM.cpp

char *GSM::SendATCmdCopyResp(char const *AT_cmd_string,
                            uint16_t start_comm_tmout, uint16_t max_interchar_tmout,
                            char const *response_string,
                            byte no_of_attempts)
{
  byte status;
  char *ret_val;
  byte i;

  

         _cell.println(AT_cmd_string);
         status = WaitResp(start_comm_tmout, max_interchar_tmout); 
        if (status == RX_FINISHED) 
        {
             // something was received but what was received?
             // ---------------------------------------------
                ret_val = (char *)comm_buf;
               // Serial.println("---  RESPONCE -------");
               //Serial.println(ret_val);
                //Serial.println("---  RESPONCE -------");
        }
                else
                {
                   Serial.println("---  RESPONCE EMPTY -------");
                }
        
    return ret_val;
    
  }

And also added this in GSM.h

char *SendATCmdCopyResp(char const *AT_cmd_string,
                            uint16_t start_comm_tmout, uint16_t max_interchar_tmout,
                            char const *response_string,
                            byte no_of_attempts);

And in my code ...

if (AT_RESP_OK == gsm.SendATCmdWaitResp("AT+CLTS=1", 500, 100, "OK", 5)) // SET MODE TO REQUEST TIME
    {
      Serial.println("Request Of Real Time From Network"); 
      
     ReturnedAnswer = gsm.SendATCmdCopyResp("AT+CCLK?", 500, 100, "OK", 1);
     Serial.println("----------------------------"); 
     Serial.print(ReturnedAnswer);
     Serial.println("---------  DATA -------------------"); 
    }

Using the above modifications the code is working ... but i'm not sure that i didn't create another problem somewhere in the library. Can you please tell me if my approach is correct ? Thank you .