Skip to content

Commit da699b9

Browse files
committed
C#: Address other CoPilot review comments.
1 parent 5e0baa4 commit da699b9

2 files changed

Lines changed: 5 additions & 4 deletions

File tree

csharp/extractor/Semmle.Extraction.CSharp/Entities/Expressions/ElementAccess.cs

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -103,9 +103,10 @@ private Expression CreateFromRangeEndpoint(TextWriter trapFile, IPropertySymbol
103103

104104
/// <summary>
105105
/// Determines whether the given method is a slice method, which is defined as a method with
106-
/// the name "Slice" or "SubString" and two parameters.
107-
/// </summary> <param name="method">The method symbol to check.</param>
108-
/// <returns>True if the method is a slice method, false otherwise.</returns>
106+
/// the name "Slice" or "Substring" and two parameters.
107+
/// </summary>
108+
/// <param name="method">The method symbol to check.</param>
109+
/// <returns>True if the method is a slice method; false otherwise.</returns>
109110
private bool IsSliceWithRange(IMethodSymbol method, [NotNullWhen(true)] out IPropertySymbol? lengthPropertySymbol, [NotNullWhen(true)] out RangeExpressionSyntax? range)
110111
{
111112
range = null;
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
---
22
category: minorAnalysis
33
---
4-
* Improved extraction of span range-access expressions (for example, `a[0..3]`). These expressions are now extracted as span `Slice` calls.
4+
* Improved extraction of range-access expressions on spans and strings (for example, `a[0..3]`). These expressions are now extracted as `Slice` (span) or `Substring` (string) calls.

0 commit comments

Comments
 (0)