Skip to content

Conversation

@Irwin1985
Copy link
Contributor

Hi Team,

In this PR I have implemented two functions in the StringFunctions.prg file:

1. STREXTRACT()

  • Full implementation including all nFlags logic:
    • Bit 0: Case-insensitive search.
    • Bit 1: End delimiter not required (returns rest of string).
    • Bit 2: Include delimiters in result.

2. DIFFERENCE()

  • Implemented using the underlying XSharp.Core.Functions.SoundEx.
  • Calculates the difference score (0-4) by comparing the SoundEx codes, matching native VFP behavior exactly.

Cleanup

  • Removed the empty stubs/definitions from ToDo-S.prg and ToDo-D.prg.
  • Updated the XML include paths to point to VfpRuntimeDocs.xml

All test have passed and logic was verified agains VFP9 behavior using local tests.

@RobertvanderHulst
Copy link
Member

Irwin,
Did you also create Unit tests?
Can you add these to the pull request?

@Irwin1985
Copy link
Contributor Author

Irwin, Did you also create Unit tests? Can you add these to the pull request?

Hi Robert, I just push it now.

@RobertvanderHulst RobertvanderHulst merged commit 776878e into main Dec 9, 2025
1 check passed
@RobertvanderHulst RobertvanderHulst deleted the feature/vfp-string-functions branch December 9, 2025 08:03
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.

3 participants