zoukankan      html  css  js  c++  java
  • 字符串截取指定下标的内容

             <?php
                                                                mb_internal_encoding("utf-8");
                                                                $pp = "";
                                                                foreach ($doc as $key => $value) {

                                                                    if (mb_strpos($value, $_GET["q"])) {
                            //关键代码
                                                                        $pp = $key . ":" . $search->highlight(mb_substr($value, mb_strpos($value, $_GET["q"]), 100)) . '...';
                                                                        echo $pp;
                                                                        break;
                                                                    }
                                                                }
                                                               
                                                                ?>

  • 相关阅读:
    LightOj 1027 A Dangerous Maze
    hdu 4738 Caocao's Bridges(割边)
    数论模板
    Codeforces Round #316 (Div. 2) D. Tree Requests(dsu)
    Educational Codeforces Round 2 E. Lomsat gelral(dsu)
    qa问答机器人pysparnn问题的召回
    pysparnn 模块使用,相似句子召回
    pytorch seq2seq闲聊机器人beam search返回结果
    pytorch seq2seq闲聊机器人加入attention机制
    python 中自带的堆模块heapq
  • 原文地址:https://www.cnblogs.com/sheapchen/p/3010130.html
Copyright © 2011-2022 走看看