Skip to content

mteFunctions: GetTextIn truncates substring at wrong starting index #20

@fireundubh

Description

@fireundubh

Problem

s := '[ARMO:01000800]';
GetTextIn(s, ':', ']')

This should return 01000800 but returns 1000800 instead.

Solution

Change:

Result := CopyFromTo(str, openIndex + 2, i - 1);

to:

Result := CopyFromTo(str, openIndex + 1, i - 1);

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions