import re


def single_line_conversion(line):
  """ converts a single line typedef to a using statement, preserving whitespace
  """
  components = re.split('\s', line)
  name = components[-1][:-1] #last item, drop the trailing space

  typedef_index = 0
  for c in components:
    if c == 'typedef':
      break
    typedef_index = typedef_index + 1

  using = 'using ' + name + ' ='
  components[typedef_index] = using

  new_line = ' '.join(components[:-1]) + ';'
  return new_line