Using '/' to separate letters.

I'm a beginner programmer and I am trying to create a Morse code translator. I wanted to use a '/' to separate the letters that are being outputted in the serial monitor but I don't understand how I could go about it. For example .../___/...

I will show my code but as mentioned I am a beginner and I am a way off with my project being finished.

Any help would be greatly appreciated thank you.

char morse_a[] = ".-";
char morse_b[] = "-...";
char morse_c[] = "-.-.";
char morse_d[] = "-..";
char morse_e[] = ".";
char morse_f[] = "..-.";
char morse_g[] = "--.";
char morse_h[] = "....";
char morse_i[] = "..";
char morse_j[] = ".---";
char morse_k[] = "-.-";
char morse_l[] = ".-..";
char morse_m[] = "--";
char morse_n[] = "-.";
char morse_o[] = "---";
char morse_p[] = ".--.";
char morse_q[] = "--.-";
char morse_r[] = ".-.";
char morse_s[] = "...";
char morse_t[] = "-";
char morse_u[] = "..-";
char morse_v[] = "...-";
char morse_w[] = ".--";
char morse_x[] = "-..-";
char morse_y[] = "-.--";
char morse_z[] = "--..";
char morse_space[] = " ";
char morse_error[] = "........";



void setup() {
  Serial.begin(9600);
  Serial.println(char2morse('S'));
  Serial.println(char2morse('O'));
  Serial.println(char2morse('S'));
  // put your setup code here, to run once:
}


char * char2morse(char c) {       // translates a single text character into morse
  c = toupper(c);                 // built-in function that converts a lowercase input to its uppercase equivalent
  switch (c) {
    case 'A':
      return morse_a;
    case 'B':
      return morse_b;
    case 'C':
      return morse_c;
    case 'D':
      return morse_d;
    case 'E':
      return morse_e;
    case 'F':
      return morse_f;
    case 'G':
      return morse_g;
    case 'H':
      return morse_h;
    case 'I':
      return morse_i;
    case 'J':
      return morse_j;
    case 'K':
      return morse_g;
    case 'L':
      return morse_l;
    case 'M':
      return morse_m;
    case 'N':
      return morse_n;
    case 'O':
      return morse_o;
    case 'P':
      return morse_p;
    case 'Q':
      return morse_q;
    case 'R':
      return morse_r;
    case 'S':
      return morse_s;
    case 'T':
      return morse_t;
    case 'U':
      return morse_u;
    case 'V':
      return morse_v;
    case 'W':
      return morse_w;
    case 'X':
      return morse_x;
    case 'Y':
      return morse_y;
    case 'Z':
      return morse_z;
    case ' ':
      return morse_space;
    

    default:
    return morse_error;
    break;


  }

  
}

String ascii2morse (String s) {

}

void loop() {
  // put your main code here, to run repeatedly:

}

Precede the / with a the escape character, backslash ().

void setup()
{
   Serial.begin(115200);
   Serial.println("1234 \/ 567");
}

void loop()
{

}
  Serial.print(char2morse('S'));
  Serial.print('/');
  Serial.print(char2morse('O'));
  Serial.print('/');
  Serial.println(char2morse('S'));

Or…

String ascii2morse (String s)
{
  static String output;
  output = "";
  for (unsigned int i = 0; i < s.length(); i++)
  {
    output += char2morse(s[i]);
    if (i < s.length() - 1)
      output += '/';
  }
  return output;
}

void setup()
{
  // put your setup code here, to run once:
  Serial.begin(9600);
  Serial.println(ascii2morse("SOS"));
}


void loop()
{
  // put your main code here, to run repeatedly:
}

johnwasser:
Or…

String ascii2morse (String s)

{
  static String output;
  output = “”;
  for (unsigned int i = 0; i < s.length(); i++)
  {
    output += char2morse(s[i]);
    if (i < s.length() - 1)
      output += ‘/’;
  }
  return output;
}

void setup()
{
  // put your setup code here, to run once:
  Serial.begin(9600);
  Serial.println(ascii2morse(“SOS”));
}

void loop()
{
  // put your main code here, to run repeatedly:
}

Thank you for your help John. It is working exactly as I wanted it to.