Skip to content

CharCursor

RelaxToolsの中の人 edited this page May 20, 2020 · 12 revisions

2.3.5 CharCursor クラス

Remarks

カーソル風文字列読み込みクラス
指定された文字列から1文字ずつ処理を行う。
このクラスは Staticクラス(Attribute VB_PredeclaredId = True) です。

Dependent

  • ICharCursorParam クラス
  • ICursor クラス

History

Date Version Note
2018-12-06 Ver.1.0.0 新規作成
2019-10-28 Ver.1.0.1 クラスのメンバにNewInstance以外表示されないように修正

Sample

Dim strBuf As String
strBuf ="123"

Dim IC As ICursor
Set IC = CharCursor.NewInstance(strBuf)

Do Until IC.Eof

    Debug.Print IC.Item '1文字

    IC.MoveNext

Loop

Immediate

1
2
3

2.3.5.1 コンストラクタ

Syntax

Set ret = CharCursor.NewInstance(Source)

Parameters

Name Required/Optional Data type Description
Source 必須 String 1文字ずつ処理する文字列を指定

Return Value

Name Data type Description
ret Object 新しいインスタンス(ICursor)

Remarks

** このクラスはコンストラクタを使用しないと実行できません。**

Example

  • None

See also

  • None

2.3.5.2 Eof(ICursor I/F)

Syntax

var = expression.Eof()

Parameters

Name Required/Optional Data type Description
expression 必須 ICursor ICursor I/F を指定します。

Return Value

Name Data type Description
var Boolean カーソルが終了:True / カーソルが終了していない:False

Remarks

ICursor I/F のプロパティです。
ICursor の Eof プロパティを取得。カーソルの終了を検出します。

Example

  • None

See also


2.3.5.3 MoveFirst(ICursor I/F)

Syntax

expression.MoveFirst()

Parameters

Name Required/Optional Data type Description
expression 必須 ICursor ICursor I/F を指定します。

Return Value

  • None

Remarks

ICursor I/F のメソッドです。
カーソル位置の初期化を行います。

Example

  • None

See also


2.3.5.4 MoveNext(ICursor I/F)

Syntax

expression.MoveNext()

Parameters

Name Required/Optional Data type Description
expression 必須 ICursor ICursor I/F を指定します。

Return Value

  • None

Remarks

ICursor I/F のメソッドです。
カーソル位置を次に移動します。

Example

  • None

See also


2.3.5.5 Item(ICursor I/F)

Syntax

var = expression.Item([opt = 0])

Parameters

Name Required/Optional Data type Description
expression 必須 ICursor ICursor I/F を指定します。
opt 省略可 Long 相対位置を数値で指定する。0:現在文字/1:次文字/-1:前文字/省略時:0

Return Value

Name Data type Description
var Variant カーソル位置の内容を取得します。

Remarks

ICursor I/F のプロパティです。
ICursor の Item プロパティを取得。現在行の内容を取得します。

Example

  • None

See also

目次

1 使用方法

1.1 ICursor 系コマンドの使い方
1.2 StringBuilderの使い方
1.3 Messageクラスの使い方
1.4 Usingクラスの使い方
1.5 CSV Parser の使い方
1.6 ArrayListとDictionaryのシリアライズ化
1.7 ArrayListとDictionaryのデシリアライズ化
1.8 PowerQueryのM言語組み立て

2 リファレンス

2.1 標準モジュール

2.1.1 CallbackHelper
2.1.2 Document

2.2 インターフェイス

2.2.1 IAppInfo
2.2.2 IBookReader
2.2.3 IComparer
2.2.4 ICursor
2.2.5 IDictionary
2.2.6 IFormManager
2.2.7 IGDIPlus
2.2.8 IList
2.2.9 ILogger
2.2.10 IMCommand
2.2.11 INewInstance
2.2.12 IParam
2.2.13 IReader
2.2.14 IRegistry
2.2.15 IStringBuilder
2.2.16 IUsing
2.2.17 IUsingArgs
2.2.18 IValueObject
2.2.19 IWriter

2.3 クラス

2.3.1 ArrayList
2.3.2 Arrays
2.3.3 BookReader
2.3.4 CsvReader
2.3.5 CharCursor
2.3.6 CheckDigit
2.3.7 Clipboard
2.3.8 CsvWriter
2.3.9 Dialog
2.3.10 Dictionary
2.3.11 ExcelUtils
2.3.12 ExplorerComparer
2.3.13 FileIO
2.3.14 FormManager
2.3.15 GDIPlus
2.3.16 Graphics
2.3.17 IniFile
2.3.18 LinkedList
2.3.19 Logger
2.3.20 MCommand
2.3.21 MCsv
2.3.22 MFile
2.3.23 MList
2.3.24 MRecord
2.3.25 MTable
2.3.26 MatchBean
2.3.27 Math
2.3.28 NewExcel
2.3.29 NewPowerPoint
2.3.30 NewWord
2.3.31 Objects
2.3.32 OneTimeSpeedBooster
2.3.33 OrderedDictionary
2.3.34 Parser
2.3.35 Process
2.3.36 RangeCursor
2.3.37 RegExp
2.3.38 Registry
2.3.39 SampleVO
2.3.40 SheetCursor
2.3.41 SortedDictionary
2.3.42 Stack
2.3.43 StrSch
2.3.44 StringBuilder
2.3.45 StringEx
2.3.46 StringUtils
2.3.47 SystemInfo
2.3.48 TableCursor
2.3.49 TaskTrayView
2.3.50 TextReader
2.3.51 TextWriter
2.3.52 Using
2.3.53 Web
2.3.54 Zip

Clone this wiki locally