MCPcopy Index your code
hub / github.com/clips/pattern / vcardFold

Method vcardFold

pattern/web/feed/feedparser.py:2117–2128  ·  view source on GitHub ↗
(self, s)

Source from the content-addressed store, hash-verified

2115 return s
2116
2117 def vcardFold(self, s):
2118 s = re.sub(';+$', '', s)
2119 sFolded = ''
2120 iMax = 75
2121 sPrefix = ''
2122 while len(s) > iMax:
2123 sFolded += sPrefix + s[:iMax] + '\n'
2124 s = s[iMax:]
2125 sPrefix = ' '
2126 iMax = 74
2127 sFolded += sPrefix + s
2128 return sFolded
2129
2130 def normalize(self, s):
2131 return re.sub(r'\s+', ' ', s).strip()

Callers 4

processSingleStringMethod · 0.95
processSingleURIMethod · 0.95
processTypeValueMethod · 0.95
findVCardsMethod · 0.95

Calls 1

lenFunction · 0.85

Tested by

no test coverage detected