Implement `execute_shell_for_output` and `string_split`.

Reporter: JoshDreamland  |  Status: closed  |  Last Modified: March 15, 2019, 07:26:20 PM

These two methods are useful in tandem. The former runs a shell function and returns all data it printed as a string. The latter splits a string on a given delimiter (common to many languages).

An example usage is performing an ls, as follows (note that no sane program should do this instead of using the file_find API):

files = string_split(execute_shell_for_output("ls"), "#", true);
for (int i = 0; i < array_length_1d(files); ++i) {
  show_message(">> " + files[i]);
}
RobertBColton  
I am glad that you are adding string_split before YoYo has. I had actually been planning to add this myself for a while but just never got around to it. Nice work! 🌹
codecov[bot]  

Codecov Report

Merging #1590 into master will increase coverage by 0.92%.
The diff coverage is 64%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master    #1590      +/-   ##
==========================================
+ Coverage   17.62%   18.55%   +0.92%     
==========================================
  Files         166      166              
  Lines       17143    17163      +20     
==========================================
+ Hits         3022     3184     +162     
+ Misses      14121    13979     -142
Impacted Files Coverage Δ
...MAsystem/SHELL/Platforms/General/POSIX/Utility.cpp 70.37% <0%> (-6.66%) ⬇️
ENIGMAsystem/SHELL/Universal_System/estring.cpp 76.21% <88.88%> (+75.69%) ⬆️
ENIGMAsystem/SHELL/Universal_System/var4.cpp 21.01% <0%> (+0.63%) ⬆️
ENIGMAsystem/SHELL/libEGMstd.cpp 42% <0%> (+8%) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update ce94d0b...e956281. Read the comment docs.

time-killer-games  

I drew a rocket ship. Thanks Josh!!
JoshDreamland  

CI passes, but codecov is crying, and this is a good time for me to set an example.
Please sign in to post comments, or you can view this issue on GitHub.