安全问答

安全问答是一个知识全球问答,包含丰富的问答知识

首页 常规 游戏 娱乐 科技 程序员

用QStringList的indexOf写一个匹配Good Morning的语法

  • 日期: 2026-12-25
  • 标签: 社会

QStringList list = {"Good Evening", "Good Morning", "Hello", "Hi"};

int index = list.indexOf(QRegExp("^Good\sMorning$"));

if(index == -1){ qDebug() << "No match found."; }else{ qDebug() << "Match found at index:" << index; }

//输出:Match found at index: 1

用QStringList的indexOf写一个匹配Good Morning的语法

原文地址: https://www.cveoy.top/t/topic/fhz6 著作权归作者所有。请勿转载和采集!

免费AI点我,无需注册和登录

  • 上一篇: 介绍下三国时期蜀汉的五虎将是谁
  • 下一篇: 直播间的口令红包的意义是什么

© 2019 • 2025 - 安全问答 站长邮箱:wxgpt@qq.com    ICP备案/许可证号:豫ICP备2024104334号-2