问题描述
好的人在这里是我需要帮助的。假设我有一个包含AlphaNumeric数据的文本字段
。
字段没有设置模式,因此任何给定的字符都可以是alpha或numeric。我需要一个函数来返回
字段内容的请求''部分'。一个''部分''将在文本字段中定义为连续的Alpha或数字
字符。
示例:
字段名称= cFoo
字段值=" 102ab3xz4"
StringPart(cFoo,2)应返回ab (作为字符串)。
StringPart(cFoo,5)应该返回4(作为整数)。
字段值=" a0914zva33"
StringPart(cFoo,1)应该返回a (作为字符串)。
StringPart(cFoo,2)应该返回914。 (整数)。
感谢您提供的任何帮助。
DB
你错过了我所说的100%。我不知道数字和
alphas的变化。我不能硬编码Mid功能。感谢
尝试,但请先阅读输入内容!
OK folks here is what I need help with. Lets assume I have a text field
that will contain AlphaNumeric data. There is no set pattern to the
field such that any given character can be either alpha or numeric. I
need a function that will return the requested ''part'' of the contents of
the field. A ''part'' would be defined as consecutive Alpha or Numeric
characters in the text field.
Examples:
Field Name = cFoo
Field Value = "102ab3xz4"
StringPart(cFoo,2) should return "ab" (as a string).
StringPart(cFoo,5) should return 4 (as an integer).
Field Value = "a0914zva33"
StringPart(cFoo,1) should return "a" (as a string).
StringPart(cFoo,2) should return "914" (as an integer).
Thanks for whatever assistance you can provide.
DB
Uh you missed 100% what I said. I will not know where the numerics and
alphas change. I cannot hard code the Mid functions. Thanks for the
try but please read the input first!
这篇关于需要的功能 - 字符串部分(来源,部分)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!