Share your repls and programming experiences

← Back to all posts
String Project
tr29038 (1)

Open respective files
FOR each line:
IF string is in lastname, firstname [middlename] format:
Find index of ','
Copy substring of full name preceding ',' index
Copy substring of full name post ',' and ' ' indices
Combine post ',' substring and preceding ',' substring in said order
Write altered name to output file
Close input and output files