code: def substitute_str_in_file(i):
      
  
      fn=i['filename']
      s1=i['string1']
      s2=i['string2']
  
      # Load text file (unicode)
      r=load_text_file({'text_file':fn})
      if r['return']>0: return r
  
      # Replace
      x=r['string']
      x=x.replace(s1,s2)
  
      # Save text file (unicode)
      r=save_text_file({'text_file':fn, 'string':x})
      if r['return']>0: return r
  
      return {'return':0}
docs: Input:  {
                filename - file
                string1  - string to be replaced
                string2  - replace string
              }
  
      Output: {
                return       - return code =  0, if successful
                                           = 16, if file not found
                                           >  0, if error
                (error)  - error text if return > 0
              }