MCPcopy Index your code
hub / github.com/sqlmapproject/sqlmap / getConsoleLength

Function getConsoleLength

lib/core/convert.py:453–468  ·  view source on GitHub ↗

Returns console width of unicode values >>> getConsoleLength("abc") 3 >>> getConsoleLength(u"\\u957f\\u6c5f") 4

(value)

Source from the content-addressed store, hash-verified

451 return retVal
452
453def getConsoleLength(value):
454 """
455 Returns console width of unicode values
456
457 >>> getConsoleLength("abc")
458 3
459 >>> getConsoleLength(u"\\u957f\\u6c5f")
460 4
461 """
462
463 if isinstance(value, six.text_type):
464 retVal = len(value) + sum(ord(_) >= 0x3000 for _ in value)
465 else:
466 retVal = len(value)
467
468 return retVal

Callers 4

dbTablesMethod · 0.90
dbTablesCountMethod · 0.90
dbTableValuesMethod · 0.90
dumpTableMethod · 0.90

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…