V2EX  ›  英汉词典

Substring

释义 Definition

substring(名词):子字符串/子串,指一个字符串中连续的一段字符序列(例如在 “hello” 中,“ell” 是一个 substring)。常见于编程与计算机文本处理语境。(另:在某些语境中也会讨论 subsequence“子序列”,但它不要求连续。)

发音 Pronunciation

/ˈsʌbˌstrɪŋ/

例句 Examples

A substring is a continuous part of a string.
子字符串是字符串中连续的一部分。

The function returns the substring between the first and last quotation marks, even if the text contains spaces.
该函数会返回第一个和最后一个引号之间的子字符串,即使文本中包含空格。

词源 Etymology

由 **sub-**(“在……之下/次级/部分”)+ string(“字符串;一串字符”)构成,字面意思是“字符串的一个部分”,在计算机科学中用来指代从字符串中截取出来的连续片段。

相关词 Related Words

文学作品中的用例 Literary Works

substring主要属于计算机与技术用语,在传统文学作品中出现较少;但在技术类著作与编程教材中常见,例如:

  • Donald E. Knuth, The Art of Computer Programming(《计算机程序设计艺术》)
  • Brian W. Kernighan & Dennis M. Ritchie, The C Programming Language(《C程序设计语言》)
  • Thomas H. Cormen et al., Introduction to Algorithms(《算法导论》)
关于   ·   帮助文档   ·   自助推广系统   ·   博客   ·   API   ·   FAQ   ·   Solana   ·   1827 人在线   最高记录 6679   ·     Select Language
创意工作者们的社区
World is powered by solitude
VERSION: 3.9.8.5 · 7ms · UTC 05:36 · PVG 13:36 · LAX 21:36 · JFK 00:36
♥ Do have faith in what you're doing.