• Tutorials
  • Api Documentation
  • Download
  • Credits
Show / Hide Table of Contents
  • AutoCheck.Core
    • Output
    • Output.Log
    • Output.Style
    • Output.Type
    • Script
    • Script.ExecutionMode
    • Utils
    • Utils.OS
  • AutoCheck.Core.Connectors
    • Atom
    • Base
    • Compressed
    • Css
    • Csv
    • CsvDocument
    • Dmoj
    • GDrive
    • Html
    • Math
    • Odoo
    • Operator
    • PlainText
    • PlainText.PlainTextDocument
    • Postgres
    • Rss
    • Shell
    • TextStream
    • Xml
    • Xml.XmlNodeType
  • AutoCheck.Core.CopyDetectors
    • Base
    • Base.Mode
    • Css
    • Html
    • PlainText
    • PlainText.File
    • SourceCode
    • SqlLog
    • Xml
  • AutoCheck.Core.Events
    • LogUpdateEventArgs
    • StatusUpdateEventArgs
    • StatusUpdateEventArgs.ExecutionEvent
  • AutoCheck.Core.Exceptions
    • ArgumentInvalidException
    • ArgumentNotFoundException
    • ConfigFileMissingException
    • ConnectionInvalidException
    • ConnectorInvalidException
    • ConnectorNotFoundException
    • DocumentInvalidException
    • DownloadFailedException
    • ItemNotFoundException
    • PorpertyNotFoundException
    • QueryInvalidException
    • RegexInvalidException
    • ResultMismatchException
    • ScriptInvalidException
    • ScriptNotFoundException
    • StyleInvalidException
    • StyleNotAppliedException
    • StyleNotFoundException
    • TableInconsistencyException
    • VariableInvalidException
    • VariableNotFoundException
  • Google.DiffMatchPatch
    • Diff
    • DiffMatchPatch
    • Operation
    • Patch

Class TextStream

Allows data manipulation using regular expressions

Inheritance
System.Object
Base
TextStream
Inherited Members
Base.ProcessRemoteFile(Utils.OS, String, String, String, Int32, String, Action<String>)
Namespace: AutoCheck.Core.Connectors
Assembly: AutoCheck.Core.dll
Syntax
public class TextStream : Base

Constructors

| Improve this Doc View Source

TextStream()

Creates a new connector instance.

Declaration
public TextStream()

Methods

| Improve this Doc View Source

Count(String, String)

Gets how many matches can be found within the given text using a regular expression.

Declaration
public int Count(string content, string regex)
Parameters
Type Name Description
System.String content

The content where the regex will be applied to.

System.String regex

The regular expression which will be used to search the content.

Returns
Type Description
System.Int32

The number of matches.

| Improve this Doc View Source

DirectoryName(String)

Returns the directory name (removes the path and also the filename)

Declaration
public string DirectoryName(string path)
Parameters
Type Name Description
System.String path

A path to a file or folder.

Returns
Type Description
System.String

A directory name.

| Improve this Doc View Source

DirectoryPath(String)

Returns the directory path (removes the file name)

Declaration
public string DirectoryPath(string path)
Parameters
Type Name Description
System.String path

A path to a file

Returns
Type Description
System.String

A path to a directory

| Improve this Doc View Source

Dispose()

Disposes the object releasing its unmanaged properties.

Declaration
public override void Dispose()
Overrides
Base.Dispose()
| Improve this Doc View Source

FileName(String)

Returns the file name (removes the path)

Declaration
public string FileName(string path)
Parameters
Type Name Description
System.String path

A path to a file.

Returns
Type Description
System.String

A file name.

| Improve this Doc View Source

Find(String, String)

Gets the matches found within the given text using a regular expression.

Declaration
public string[] Find(string content, string regex)
Parameters
Type Name Description
System.String content

The content where the regex will be applied to.

System.String regex

The regular expression which will be used to search the content.

Returns
Type Description
System.String[]

A set of matches.

| Improve this Doc View Source

Replace(String, String, String)

Replaces every match within the given content with the given replacement.

Declaration
public string Replace(string content, string replacement, string regex)
Parameters
Type Name Description
System.String content

The content where the regex will be applied to.

System.String replacement

Every match will be replaced with this.

System.String regex

The regular expression which will be used to search the content.

Returns
Type Description
System.String

The replaced string.

| Improve this Doc View Source

Substring(String, String)

Gets the substring found within the given text using a regular expression (first match)

Declaration
public string Substring(string content, string regex)
Parameters
Type Name Description
System.String content

The content where the regex will be applied to.

System.String regex

The regular expression which will be used to search the content.

Returns
Type Description
System.String

A set of matches.

Extension Methods

ObjectExtensions.DeepClone<T>(T)
  • Improve this Doc
  • View Source
In This Article
Back to top Generated by DocFX