SQL Tools Service
Show / Hide Table of Contents
Improve this Doc View Source

Class TextUtilities

Inheritance
System.Object
TextUtilities
Namespace:Microsoft.SqlTools.ServiceLayer.Utility
Assembly:Microsoft.SqlTools.ServiceLayer.dll
Syntax
public static class TextUtilities

Methods

| Improve this Doc View Source

PositionOfCursor(String, Int32, Int32, out Int32)

Find the position of the cursor in the SQL script content buffer and return previous new line position

Declaration
public static int PositionOfCursor(string sql, int startRow, int startColumn, out int prevNewLine)
Parameters
Type Name Description
System.String sql
System.Int32 startRow
System.Int32 startColumn
System.Int32 prevNewLine
Returns
Type Description
System.Int32
| Improve this Doc View Source

PositionOfNextDelimeter(String, Int32, Int32)

Find the position of the next delimeter for autocomplete token replacement.

Declaration
public static int PositionOfNextDelimeter(string sql, int startRow, int startColumn)
Parameters
Type Name Description
System.String sql
System.Int32 startRow
System.Int32 startColumn
Returns
Type Description
System.Int32
| Improve this Doc View Source

PositionOfPrevDelimeter(String, Int32, Int32)

Find the position of the previous delimeter for autocomplete token replacement. SQL Parser may have similar functionality in which case we'll delete this method.

Declaration
public static int PositionOfPrevDelimeter(string sql, int startRow, int startColumn)
Parameters
Type Name Description
System.String sql
System.Int32 startRow
System.Int32 startColumn
Returns
Type Description
System.Int32
| Improve this Doc View Source

RemoveSquareBracketSyntax(String)

Remove square bracket syntax from a token string

Declaration
public static string RemoveSquareBracketSyntax(string tokenText)
Parameters
Type Name Description
System.String tokenText
Returns
Type Description
System.String

string with outer brackets removed

  • Improve this Doc
  • View Source

© Microsoft  //  Generated with DocFX