Skip to content

Conversation

@Irwin1985
Copy link
Contributor

Implemented ALINES() using Regex to support unlimited separators (surpassing VFP's limit of 23). Handles all flags including Case Insensitive and Include Separators.

Merry Christmas team!🥂

Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR implements the ALINES() function for Visual FoxPro compatibility, using regular expressions to support an unlimited number of separators (surpassing VFP's limit of 23). The implementation handles all flag combinations including trimming, empty line handling, case-insensitive parsing, and separator inclusion.

  • Implemented ALINES() function with regex-based parsing in ArrayFunctions.prg
  • Added flag constants (ALINES_TRIM, ALINES_INCLUDE_LAST, ALINES_NO_EMPTY, ALINES_CASE_IGNORE, ALINES_INCLUDE_SEP) in Defines.prg
  • Removed ALINES stub from ToDo-A.prg as it's now implemented
  • Added comprehensive test suite covering most flag combinations

Reviewed changes

Copilot reviewed 4 out of 4 changed files in this pull request and generated 4 comments.

File Description
src/Runtime/XSharp.VFP/ArrayFunctions.prg Implements the ALINES() function using Regex.Split with support for multiple separators and all VFP flags, and adds necessary using statements for System.Text.RegularExpressions, System.Collections.Generic, and System.Text
src/Runtime/XSharp.VFP/Defines.prg Adds five flag constants for ALINES() function behavior control
src/Runtime/XSharp.VFP/ToDo-A.prg Removes the ALINES function stub as it has been implemented
src/Runtime/XSharp.VFP.Tests/FoxArraytests.prg Adds ALinesTests class with six test methods covering basic parsing, custom separators, multiple separators, and various flag behaviors

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@RobertvanderHulst RobertvanderHulst merged commit 0dfaa40 into dev Dec 27, 2025
1 check passed
@RobertvanderHulst RobertvanderHulst deleted the feature/implement-alines branch December 27, 2025 11:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants