+
    üÐj#  ã                   óJ   € R t R
R ltR tR tRR lt]tR tR tR tRR lt	R	# )z'
Miscellany of text-munging functions.
c                ó*  € Rp. p\        V 4      \        J d§   RpV P                  4        F�  w  rE\        WQR,           4      p\	        V4      '       d<   \        V4      '       d   VR\        R4      )  pVP                  V RV RV 24       Kc  VP                  V RV RV\        V4      ^,           R  24       K‘  	  M«\        V 4      \        J g   \        V 4      \        J d[   \        V 4      \        J d   R	pMR
pV  F;  p\        WaR,           4      pVP                  VP                  4       R,           4       K=  	  M+\        V3R l\        V 4      P                  R4      4      VR&   V'       g   VP                  V4       V'       dN   W^ ,          ,           V^ ,          \        V4      ^,           R ,           V^ &   VR,          VR,          ,           VR&   RP                  V4      p\	        V4      '       d   \        V4      '       g
   VR,           pV# )aP  
Expansive string formatting for sequence types.

C{list.__str__} and C{dict.__str__} use C{repr()} to display their
elements.  This function also turns these sequence types
into strings, but uses C{str()} on their elements instead.

Sequence elements are also displayed on separate lines, and nested
sequences have nested indentation.
Ú z{}z   NÚ
Ú z:
z: z()z[]Ú,c                 ó   € W,           # ©N© )ÚsÚis   &&Ú5/usr/lib/python3/dist-packages/twisted/python/text.pyÚ<lambda>ÚstringyString.<locals>.<lambda>/   s   € ¨Q®Uó    ºNNNéÿÿÿÿ)ÚtypeÚdictÚitemsÚstringyStringÚisMultilineÚendsInNewlineÚlenÚappendÚtupleÚlistÚrstripÚmapÚstrÚsplitÚjoin)ÚobjectÚindentationÚbracesÚslÚkeyÚvalueÚelementr
   s   &&      r   r   r      s¼  € ð €FØ	€BäˆFƒ|”tÓØˆØ Ÿ,™,ž.‰JˆCÜ! %°uÕ)<Ó=ˆEÜ˜5×!Ò!Ü  ×'Ò'Ø! ,¤S¨£Y JÐ/�EØ—	‘	˜[˜M¨¨3¨%¨s°5°'Ð:Ö;ð —	‘	˜[˜M¨¨3¨%¨r°%¼¸KÓ8HÈ1Õ8LÐ8NÐ2OÐ1PÐQÖRò )ô 
ˆf‹œÓ	¤$ v£,´$Ó"6Ü�‹<œ5Ó Ø‰FàˆFãˆGÜ# G¸3Õ->Ó?ˆGØ�I‰I�g—n‘nÓ&¨Õ,Ö-ò ô  Ó2´C¸³K×4EÑ4EÀdÓ4KÓLˆˆ1‰çØ
�	‰	�+ÔçØ Q�iÕ'¨"¨Q­%´°KÓ0@À1Õ0DÐ0FÐ*GÕGˆˆ1‰Ø�B•˜& �*Õ$ˆˆ2‰à�	‰	�"‹€Aä�1‡~‚~œm¨A×.Ò.Ø��Hˆà€Hr   c                ó*   € V P                  R4      R8g  # )z5
Returns C{True} if this string has a newline in it.
r   r   )Úfind©r
   s   &r   r   r   @   s   € ð �6‰6�$‹<˜2ÑÐr   c                ó&   € V \        R4      ) R R8H  # )z3
Returns C{True} if this string ends in a newline.
r   N)r   r*   s   &r   r   r   G   s   € ð Œc�$‹iˆZˆ\ˆ?˜dÑ"Ð"r   c                ó6  € . pV P                  R4      ^ 8¼  d?   V P                  R4      pV F%  pVP                  \        WA4      R.,           4       K'  	  V# V P                  4       p^ p^ pV'       d§   V\	        WW,          4      ,           pV^,           pWa8”  d@   V^8X  d   M	V^,
          pV^ V WWR rXVP                  RP                  V4      4       ^ p^ pKn  \	        V4      V8”  g&   VP                  RP                  V4      4       VR K£  V^,           pK®  V# )z÷
Given a string and a column width, return a list of lines.

Caveat: I'm use a stupid greedy word-wrapping
algorythm.  I won't put two spaces at the end
of a sentence.  I don't do full justification.
And no, I've never even *heard* of hypenation.
z

r   Nr   r   )r)   r   ÚextendÚ
greedyWrapr   r   r    )	ÚinStringÚwidthÚoutLinesÚ
paragraphsÚparaÚinWordsÚcolumnÚptr_lineÚls	   &&       r   r.   r.   N   s
  € ð €Hð ‡}�}�VÓ Ô!Ø—^‘^ FÓ+ˆ
ÛˆDØ�O‰OœJ tÓ3°r°dÕ:Ö;ñ àˆØ�n‰nÓ€Gà€FØ€Hß
Øœ#˜gÕ/Ó0Õ0ˆØ˜a•<ˆàŒ>Ø˜1Œ}àð $ a�<�Ø# A hÐ/°¸Ð1C�Ø�O‰O˜CŸH™H Q›KÔ(àˆHØŠFÜ�g“, Ô)à�O‰O˜CŸH™H WÓ-Ô.Ø˜’
ð ˜a•ZŠFð €Or   c                 ó~   € . pV  F4  pV'       g   VP                  4       '       g   K#  VP                  V4       K6  	  V# r   )Ústripr   )ÚlinesÚretÚlines   &  r   ÚremoveLeadingBlanksr=   ƒ   s1   € Ø
€CÛˆß�$—*‘*—,”,Ø�J‰J�tÖñ ð €Jr   c                 ó¼   € \        V P                  R 4      4      pVP                  4        \        V4      pVP                  4        R P                  V4      R ,           # )r   )r=   r   Úreverser    )r
   r:   s   & r   ÚremoveLeadingTrailingBlanksr@   ‹   sD   € Ü §¡¨£Ó.€EØ	‡M�M„OÜ Ó&€EØ	‡M�M„OØ�9‰9�UÓ˜dÕ"Ð"r   c                óŒ  € . pRpRpV P                  4        F©  pVf+   V'       d#   V^ ,          R9   d   V^ ,          pVR,          p. pVf   VP                  V4       KH  V'       dI   VR,          V8X  d;   VRR pVP                  V4       VP                  RP                  V4      4       RpK˜  VP                  V4       K«  	  V# )a!  
Like a string split, but don't break substrings inside quotes.

>>> splitQuoted('the "hairy monkey" likes pie')
['the', 'hairy monkey', 'likes', 'pie']

Another one of those "someone must have a better solution for
this" things.  This implementation is a VERY DUMB hack done too
quickly.
N:é   NNr   )Ú"Ú'r   )r   r   r    )r
   ÚoutÚquotÚphraseÚwords   &    r   ÚsplitQuotedrI   “   s°   € ð €CØ€DØ€FØ—‘–	ˆØŠ>ß˜˜a� JÔ.Ø˜A•w�Ø˜B•x�Ø�àŠ>Ø�J‰J�tÖç˜˜b� TÔ)Ø˜C˜R�y�Ø—‘˜dÔ#Ø—
‘
˜3Ÿ8™8 FÓ+Ô,Ø’à—‘˜dÖ#ñ! ð$ €Jr   c                ó´  € \        V 4      ! 4       p\        \        V 4      R4      pV'       g   V P                  4       p  VP	                  V\        V 4      ,
          4      pV'       g   VP                  4       p\        V4      pV^ 8X  d   R# \        V4      V,           V,
          pV^ 8:  d
   W5,           pMW7R V,           pVP                  V 4      R8w  g   Kš  R# )zO
Find whether string C{p} occurs in a read()able object C{f}.

@rtype: C{bool}
FNTi   r   )r   Úmaxr   ÚlowerÚreadr)   )ÚpÚfÚcaseSensitiveÚbufÚbuf_lenÚrÚ
bytes_readr7   s   &&&     r   ÚstrFilerU   ¶   s©   € ô ˆqŒ'‹)€CÜ”#�a“&˜*Ó%€GßØ�G‰G‹IˆØ
Ø�F‰F�7œS ›VÕ#Ó$ˆßØ—‘“	ˆAÜ˜“Vˆ
Ø˜Œ?ÙÜ�‹H�zÕ! GÕ+ˆØ�Œ6Ø•'‰Cà�b�'˜A•+ˆCØ�8‰8�A‹;˜"ÖÙr   N)r   )éP   )T)
Ú__doc__r   r   r   r.   ÚwordWrapr=   r@   rI   rU   r	   r   r   Ú<module>rY      s<   ðñô
2òjò#ô/ðd €òò#ò öFr   