ConvertFrom-SourceTable | source table or markdown table | Grid library
kandi X-RAY | ConvertFrom-SourceTable Summary
kandi X-RAY | ConvertFrom-SourceTable Summary
Converts a source table (format-table) or markdown table to objects
Support
Quality
Security
License
Reuse
Top functions reviewed by kandi - BETA
Currently covering the most popular Java, JavaScript and Python libraries. See a Sample of ConvertFrom-SourceTable
ConvertFrom-SourceTable Key Features
ConvertFrom-SourceTable Examples and Code Snippets
Community Discussions
Trending Discussions on ConvertFrom-SourceTable
QUESTION
I have formatted text files from other sources; I can't control those sources or ask them to generate a more sensible-for-my-purposes format like CSV. I can look at the header lines of the files to determine the column widths (and names, but they're not at issue here). Once I've done that, I'll have an array of widths. I'd like to be able to split subsequent lines in that file based on the widths I've determined from the header.
Obviously, I can loop through the array of widths, and bite off the initial substring of the appropriate length, but I'm hoping there's a more efficient way - for example, if I wanted to use fixed-width columns, I could just use -split "(\w{$foo})"
, where $foo
is the variable that contains the width of the column.
Is there, in fact, a more efficient way of doing this?
Example data:
...ANSWER
Answered 2019-Apr-18 at 08:57Is there, in fact, a more efficient way of doing this?
If by "more efficient", you mean "something that takes fewer CPU cycles", then yes:
Community Discussions, Code Snippets contain sources that include Stack Exchange Network
Vulnerabilities
No vulnerabilities reported
Install ConvertFrom-SourceTable
Support
Reuse Trending Solutions
Find, review, and download reusable Libraries, Code Snippets, Cloud APIs from over 650 million Knowledge Items
Find more librariesStay Updated
Subscribe to our newsletter for trending solutions and developer bootcamps
Share this Page