Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Create free account
hub
/
github.com/olekukonko/tablewriter
/ functions
Functions
889 in github.com/olekukonko/tablewriter
⨍
Functions
889
◇
Types & classes
130
↓ 2 callers
Method
Row
Row returns a RowConfigBuilder for row configuration
config.go:46
↓ 2 callers
Method
Row
()
tw/symbols.go:935
↓ 2 callers
Method
Row
()
tw/symbols.go:990
↓ 2 callers
Method
Rune
()
pkg/twwidth/tab.go:28
↓ 2 callers
Function
SetCacheCapacity
SetCacheCapacity changes the cache size dynamically If capacity <= 0, disables caching entirely
pkg/twwidth/cache.go:15
↓ 2 callers
Function
SetCondition
SetCondition sets the global East Asian width setting based on a runewidth.Condition. Deprecated: use SetOptions with the new twwidth.Options struct i
pkg/twwidth/width.go:112
↓ 2 callers
Function
SetOptions
SetOptions sets the global options for width calculation. This function is thread-safe.
pkg/twwidth/width.go:142
↓ 2 callers
Function
SetTabWidth
SetTabWidth sets the global tab width.
pkg/twwidth/tab.go:280
↓ 2 callers
Method
Size
Size returns the current tab width, default if unset.
pkg/twwidth/tab.go:52
↓ 2 callers
Function
SplitCamelCase
SplitCamelCase splits a camelCase or PascalCase or snake_case string into separate words. It detects transitions between uppercase, lowercase, digits,
tw/fn.go:124
↓ 2 callers
Method
String
()
_example/filetable/main.go:85
↓ 2 callers
Function
TabInstance
TabInstance returns the singleton Tabinal.
pkg/twwidth/tab.go:267
↓ 2 callers
Function
Title
Title normalizes and uppercases a label string for use in headers. It replaces underscores and certain dots with spaces and trims whitespace.
tw/fn.go:22
↓ 2 callers
Function
WidthNoCache
WidthNoCache calculates the visual width of a string without using the global cache. Example: width := twdw.WidthNoCache("Hello\x1b[31mWorld") // R
pkg/twwidth/width.go:370
↓ 2 callers
Function
WithCounters
WithCounters enables line counting by wrapping the table's writer. If a custom counter (that implements tw.Counter) is provided, it will be used. If t
option.go:711
↓ 2 callers
Method
WithHeaderAlignment
WithHeaderAlignment sets the text alignment for all header cells. Invalid alignments are ignored.
config.go:157
↓ 2 callers
Function
WithHeaderControl
WithHeaderControl sets the control behavior for the table header. Logs the change if debugging is enabled.
option.go:588
↓ 2 callers
Method
WithHeaderMergeMode
Deprecated: Use .Header().CellMerging().WithMode(...) instead. This method will be removed in a future version.
config.go:198
↓ 2 callers
Method
WithMode
WithMode sets the merge mode (e.g., tw.MergeVertical, tw.MergeHierarchical).
config.go:637
↓ 2 callers
Function
WrapStringWithSpaces
WrapStringWithSpaces wraps a string into lines of a specified display width while preserving leading and trailing spaces. It splits the input string i
pkg/twwarp/wrap.go:80
↓ 2 callers
Function
WrapWords
WrapWords is the low-level line-breaking algorithm, useful if you need more control over the details of the text wrapping process. For most uses, Wrap
pkg/twwarp/wrap.go:177
↓ 2 callers
Method
applyHorizontalMerges
applyHorizontalMerges adjusts column widths for horizontal merges. Parameters include position, ctx for rendering, and mergeStates for merges. No retu
zoo.go:174
↓ 2 callers
Method
buildAdjacentCells
buildAdjacentCells constructs cell contexts for adjacent lines. Parameters include ctx, mctx, hctx, and direction (-1 for prev, +1 for next). Returns
zoo.go:380
↓ 2 callers
Function
defaultBlueprint
defaultBlueprint returns a default Rendition for ASCII table rendering with borders and light symbols.
renderer/fn.go:11
↓ 2 callers
Function
detectEastAsian
detectEastAsian evaluates the environment and locale settings to determine if East Asian width rules should apply.
pkg/twwidth/ea.go:236
↓ 2 callers
Method
extractFieldsAndValuesFromStruct
extractFieldsAndValuesFromStruct is the new single source of truth for struct reflection. It recursively processes a struct, handling pointers and emb
zoo.go:1659
↓ 2 callers
Method
extractHeadersFromStruct
extractHeadersFromStruct is now a thin wrapper around the new unified function. It only cares about the header names.
zoo.go:1651
↓ 2 callers
Method
finalizeHierarchicalMergeBlock
finalizeHierarchicalMergeBlock sets Span and End for hierarchical merges. Parameters include ctx, mctx, col, startRow, and endRow. No return value.
tablewriter.go:695
↓ 2 callers
Function
getCSVReaderFromString
(data string)
tests/csv_test.go:21
↓ 2 callers
Function
getLastContentLine
(buf *bytes.Buffer)
tests/fn.go:272
↓ 2 callers
Function
getNormalizedLocale
getNormalizedLocale returns the normalized locale by inspecting environment variables LC_ALL, LC_CTYPE, and LANG.
pkg/twwidth/ea.go:400
↓ 2 callers
Method
getNumColsToUse
getNumColsToUse determines the number of columns to use for rendering, based on streaming or batch mode. Returns the number of columns (streamNumCols
zoo.go:1517
↓ 2 callers
Method
hasFooterElements
hasFooterElements checks if the footer has renderable elements. No parameters are required. Returns true if footer has content or padding, false other
tablewriter.go:773
↓ 2 callers
Function
isCJKLocale
isCJKLocale determines if a given locale string corresponds to a CJK (Chinese, Japanese, Korean) language or region.
pkg/twwidth/ea.go:378
↓ 2 callers
Function
isGraphicalRenderer
(rendererName string)
cmd/csv2table/csv2table.go:479
↓ 2 callers
Function
mergeConfig
mergeConfig merges a source Config into a destination Config, prioritizing non-default source values. It performs deep merging for complex types like
option.go:927
↓ 2 callers
Function
mergeStreamConfig
mergeStreamConfig merges a source StreamConfig into a destination StreamConfig, prioritizing non-default source values.
option.go:971
↓ 2 callers
Function
normalizeSVG
normalizeSVG performs lightweight normalization for fast comparison
tests/svg_test.go:51
↓ 2 callers
Method
prepareFooter
prepareFooter processes footer content and applies merges. Parameters ctx and mctx hold rendering and merge state. No return value.
tablewriter.go:1209
↓ 2 callers
Method
printTopBottomCaption
printTopBottomCaption prints the table's caption at the specified top or bottom position. It wraps the caption text to fit the table width or a user-d
tablewriter.go:835
↓ 2 callers
Function
resetGlobalCache
()
pkg/twwidth/width_test.go:23
↓ 2 callers
Method
streamAppendRow
streamAppendRow processes and renders a single row in streaming mode. It calculates/uses fixed stream widths, processes content, renders separators an
stream.go:201
↓ 2 callers
Function
strip
(s string)
pkg/twwidth/width.go:414
↓ 1 callers
Method
BottomLeft
Right junction
tw/symbols.go:21
↓ 1 callers
Method
BottomLeft
()
tw/symbols.go:942
↓ 1 callers
Method
BottomLeft
()
tw/symbols.go:997
↓ 1 callers
Method
BottomRight
()
tw/symbols.go:944
↓ 1 callers
Method
BottomRight
()
tw/symbols.go:999
↓ 1 callers
Function
BreakPoint
BreakPoint finds the rune index where the display width of a string first exceeds the specified limit. It returns the number of runes if the entire st
tw/fn.go:197
↓ 1 callers
Method
Center
()
tw/symbols.go:934
↓ 1 callers
Method
Center
()
tw/symbols.go:989
↓ 1 callers
Method
Center
()
tw/deprecated.go:35
↓ 1 callers
Method
Center
()
tw/deprecated.go:124
↓ 1 callers
Method
Config
()
renderer/ocean.go:57
↓ 1 callers
Method
Config
Config returns the renderer's current configuration.
renderer/blueprint.go:57
↓ 1 callers
Method
Counters
Counters returns the slice of all active counter instances. This is useful when multiple counters are enabled. It must be called *after* Render().
tablewriter.go:554
↓ 1 callers
Function
Debugging
Debugging returns detailed information about the detection decision. Useful for users to include in Github issues.
pkg/twwidth/ea.go:207
↓ 1 callers
Function
Display
Display calculates the visual width of a string using a specific runewidth.Condition. Deprecated: use WidthWithOptions with the new twwidth.Options st
pkg/twwidth/width.go:61
↓ 1 callers
Function
EastAsianMode
EastAsianMode returns the decision path used for the current environment. Useful for debugging why a specific width was chosen.
pkg/twwidth/ea.go:174
↓ 1 callers
Method
Empty
Empty reports whether all padding strings are empty (all fields == ""). Note that an Empty padding may still take effect if Overwrite is true.
tw/types.go:213
↓ 1 callers
Method
Line
(ctx tw.Formatting)
renderer/ocean.go:176
↓ 1 callers
Method
MidLeft
()
tw/deprecated.go:41
↓ 1 callers
Method
MidLeft
()
tw/deprecated.go:130
↓ 1 callers
Method
MidRight
()
tw/deprecated.go:42
↓ 1 callers
Method
MidRight
Left junction
tw/deprecated.go:131
↓ 1 callers
Function
Pad
Pad aligns a string within a specified width using a padding character. It truncates if the string is wider than the target width.
tw/fn.go:84
↓ 1 callers
Function
PadCenter
PadCenter centers a string within a specified width using a padding character. Extra padding is split between left and right, with slight preference t
tw/fn.go:48
↓ 1 callers
Method
Reset
Reset clears the renderer's internal state, including debug traces and merge tracking.
renderer/html.go:414
↓ 1 callers
Method
SetWidth
SetWidth sets the tab width if valid (1–32).
pkg/twwidth/tab.go:66
↓ 1 callers
Method
String
()
tw/symbols.go:86
↓ 1 callers
Function
StripColors
StripColors removes ANSI color codes from a string.
tests/fn.go:194
↓ 1 callers
Method
TopLeft
Vertical line symbol Corner and junction symbols
tw/symbols.go:16
↓ 1 callers
Method
TopLeft
()
tw/symbols.go:937
↓ 1 callers
Method
TopLeft
()
tw/symbols.go:992
↓ 1 callers
Method
TopRight
()
tw/symbols.go:939
↓ 1 callers
Method
TopRight
()
tw/symbols.go:994
↓ 1 callers
Function
WithMaxWidth
WithMaxWidth sets a global maximum table width for the table. Negative values are ignored, and the change is logged if debugging is enabled.
option.go:42
↓ 1 callers
Function
WithRowAutoFormat
WithRowAutoFormat enables or disables automatic formatting for row cells. Logs the change if debugging is enabled.
option.go:577
↓ 1 callers
Function
WithRowAutoWrap
WithRowAutoWrap sets the wrapping behavior for row cells. Invalid wrap modes are ignored, and the change is logged if debugging is enabled.
option.go:314
↓ 1 callers
Function
WithStringer
WithStringer sets a custom stringer function for converting row data and clears the stringer cache. Logs the change if debugging is enabled.
option.go:471
↓ 1 callers
Function
WithTrimLine
WithTrimLine sets whether empty visual lines within a cell are trimmed. Logs the change if debugging is enabled.
option.go:544
↓ 1 callers
Method
applyHierarchicalMerges
applyHierarchicalMerges applies hierarchical merges to row content. Parameters ctx and mctx hold rendering and merge state. No return value.
zoo.go:20
↓ 1 callers
Method
applyVerticalMerges
applyVerticalMerges applies vertical merges to row content. Parameters ctx and mctx hold rendering and merge state. No return value.
zoo.go:242
↓ 1 callers
Method
calculateAllColumnWidths
calculateAllColumnWidths computes column widths based on content and merges. Uses content length and merge spans; handles horizontal merges by distrib
renderer/svg.go:153
↓ 1 callers
Method
calculateAndNormalizeWidths
calculateAndNormalizeWidths computes and normalizes column widths. Parameter ctx holds rendering state with width maps. Returns an error if width calc
zoo.go:620
↓ 1 callers
Function
compareFloatStrings
(a, b string)
tests/svg_test.go:172
↓ 1 callers
Function
compareSVGStructure
compareSVGStructure does structural XML comparison
tests/svg_test.go:99
↓ 1 callers
Function
compareXMLNodes
compareXMLNodes recursively compares XML nodes
tests/svg_test.go:113
↓ 1 callers
Function
containsIndentedLine
Helper to check if a specific line content in the table retains whitespace/tab indentation
tests/feature_test.go:581
↓ 1 callers
Method
convertItemToCells
convertItemToCells is responsible for converting a single input item (which could be a struct, a basic type, or an item implementing Stringer/Formatte
zoo.go:1220
↓ 1 callers
Function
defaultColorized
defaultColorized returns a default ColorizedConfig optimized for dark terminal backgrounds with colored headers, rows, and borders.
renderer/fn.go:41
↓ 1 callers
Function
defaultOceanRendererConfig
defaultOceanRendererConfig returns a base tw.Rendition for the Ocean renderer.
renderer/fn.go:85
↓ 1 callers
Method
detect
detect determines tab width using env, editorconfig, project, or term.
pkg/twwidth/tab.go:83
↓ 1 callers
Method
determineLocation
determineLocation determines the boundary location for a line. Parameters include lineIdx, totalLines, topPad, and bottomPad. Returns a tw.Location in
zoo.go:1416
↓ 1 callers
Function
editorConfigTabWidth
()
pkg/twwidth/tab.go:105
↓ 1 callers
Method
estimateTextWidth
estimateTextWidth estimates text width in SVG units. Parameter text is the input string to measure. Returns the estimated width based on font size and
renderer/svg.go:388
↓ 1 callers
Method
fetchEmployees
fetchEmployees simulates fetching data from a database.
tests/struct_test.go:29
↓ 1 callers
Method
formatCell
formatCell formats a Markdown cell's content with padding and alignment, ensuring at least 3 characters wide.
renderer/markdown.go:157
↓ 1 callers
Method
formatCell
formatCell formats a cell's content with color, width, padding, and alignment, handling whitespace trimming and truncation.
renderer/colorized.go:344
↓ 1 callers
Method
formatCell
formatCell formats a cell's content with specified width, padding, and alignment, returning an empty string if width is non-positive.
renderer/blueprint.go:272
← previous
next →
201–300 of 889, ranked by callers