Skip to content

New rule: StrUtils should be preferred over 'Copy' #283

Open
@Skarvion

Description

@Skarvion

Prerequisites

  • This rule has not already been suggested.
  • This should be a new rule, not an improvement to an existing rule.
  • This rule would be generally useful, not specific to my code or setup.

Suggested rule title

Should use 'LeftStr' instead of 'Copy' from start

Rule description

Using Copy(Text, 1, Count) is the equivalent of using LeftStr(Text, Count) but impacts readability and making the intention harder to understand. Using LeftStr conveys intention better.

Rationale

Seeing many Copy used in different context makes it harder to understand the intention of its usage. By removing a sizeable chunk of generic Copy(Text, 1, Count), it makes it easier to focus on where other usage of Copy does matter.

Metadata

Metadata

Assignees

No one assigned

    Labels

    featureNew feature or requestruleImprovements or additions to rules

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions