Exemple #1
0
def Strip3B2codes(s):
  # now step thru the array [d] from 0 to length of [d] in steps of 1:
  for ln in range(0,len(d),1):
    pos = globals.instr(str(d[ln][1]), "\\u")
    if pos == -1:
      s = globals.SR(s, str(d[ln][0].strip()), str(d[ln][1].strip()) + "")
      print("looking for '" + str(d[ln][0].strip()) + "'\treplacing with\t'" + str(d[ln][1].strip()) + "'")
    else:
      s = globals.SR(s, str(d[ln][0].strip()), str(d[ln][1].strip()) + " ")
      print("looking for '" + str(d[ln][0].strip()) + "'\treplacing with\t'" + str(d[ln][1].strip()) + " '")

  return s
Exemple #2
0
def stripStyles(s):
  
  pos = globals.instr(s, '>')
  newStr = globals.mid(s, pos+1, len(s))
  
  return newStr
Exemple #3
0
def toggleStyles(s):
  
  pos = globals.instr(s, '>')
  styname = globals.left(s, pos+1)
  
  return styname