Table of Contents
Example
Output
Home Backend Development C++ In C/C++, the wcspbrk() function is translated as follows:

In C/C++, the wcspbrk() function is translated as follows:

Aug 27, 2023 pm 12:41 PM
translate c/c wcspbrk

In C/C++, the wcspbrk() function is translated as follows:

The wcspbrk() function is a built-in function of C or C. It searches one wide string for a set of wide characters present in another wide string. This function is located in the cwhar header file.

This function accepts two parameters. The first parameter is the target string and the second parameter is the source string. As the target string we have to pass a null terminated wide string to search for. As the source string, we must pass a null-terminated wide string containing the characters to be searched for.

This function returns two values. If one or more wide characters are present in the destination string or source string, this function returns a pointer to the first wide character in the destination string and source string. If there are no wide characters in the destination or source string, a null pointer is returned.

Example

<span class="com">#include</span><span class="pln"> </span><span class="str"><cwchar></span>
<span class="com">#include</span><span class="pln"> </span><span class="str"><iostream></span>
<span class="kwd">using</span><span class="pln"> </span><span class="kwd">namespace</span><span class="pln"> std</span><span class="pun">;</span>
<span class="pln">main </span><span class="pun">() {</span>
<span class="typ">   wchar_t</span><span class="pln"> wcs</span><span class="pun">[]</span><span class="pln"> </span><span class="pun">=</span><span class="pln"> L</span><span class="str">"Hello World. This is C++ PROGRAM."</span><span class="pun">;</span>
<span class="typ">   wchar_t</span><span class="pln"> key</span><span class="pun">[]</span><span class="pln"> </span><span class="pun">=</span><span class="pln"> L</span><span class="str">"aeiouAEIOU"</span><span class="pun">;</span>
<span class="typ">   wchar_t</span><span class="pln"> </span><span class="pun">*</span><span class="pln"> pwc</span><span class="pun">;</span>
<span class="pln">   wcout </span><span class="pun"><<</span><span class="pln"> L</span><span class="str">"Vowels in &#39;"</span><span class="pun"><<</span><span class="pln"> wcs </span><span class="pun"><<</span><span class="pln"> </span><span class="str">"&#39;: "</span><span class="pun">;</span>
<span class="pln">   pwc </span><span class="pun">=</span><span class="pln"> wcspbrk </span><span class="pun">(</span><span class="pln">wcs</span><span class="pun">,</span><span class="pln"> key</span><span class="pun">);</span>
<span class="kwd">   while</span><span class="pln"> </span><span class="pun">(</span><span class="pln">pwc </span><span class="pun">!=</span><span class="pln"> NULL</span><span class="pun">) {</span>
<span class="pln">      wcout </span><span class="pun"><<</span><span class="pln"> </span><span class="pun">*</span><span class="pln">pwc </span><span class="pun"><<</span><span class="pln"> L</span><span class="str">" "</span><span class="pun">;</span>
<span class="pln">      pwc </span><span class="pun">=</span><span class="pln"> wcspbrk </span><span class="pun">(</span><span class="pln">pwc</span><span class="pun">+</span><span class="lit">1</span><span class="pun">,</span><span class="pln">key</span><span class="pun">);</span>
<span class="pun">   }</span>
<span class="pln">   wcout </span><span class="pun"><<</span><span class="pln"> L</span><span class="str">"\n"</span><span class="pun">;</span>
<span class="pun">}</span>
Copy after login

Output

Vowels in &#39;Hello World. This is C++ PROGRAM.&#39;: e o o i i O A
Copy after login

The above is the detailed content of In C/C++, the wcspbrk() function is translated as follows:. For more information, please follow other related articles on the PHP Chinese website!

Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn

Hot AI Tools

Undresser.AI Undress

Undresser.AI Undress

AI-powered app for creating realistic nude photos

AI Clothes Remover

AI Clothes Remover

Online AI tool for removing clothes from photos.

Undress AI Tool

Undress AI Tool

Undress images for free

Clothoff.io

Clothoff.io

AI clothes remover

Video Face Swap

Video Face Swap

Swap faces in any video effortlessly with our completely free AI face swap tool!

Hot Tools

Notepad++7.3.1

Notepad++7.3.1

Easy-to-use and free code editor

SublimeText3 Chinese version

SublimeText3 Chinese version

Chinese version, very easy to use

Zend Studio 13.0.1

Zend Studio 13.0.1

Powerful PHP integrated development environment

Dreamweaver CS6

Dreamweaver CS6

Visual web development tools

SublimeText3 Mac version

SublimeText3 Mac version

God-level code editing software (SublimeText3)

What should I do if the translation web page that comes with the Edge browser is missing? What should I do if the translation web page that comes with the Edge browser is missing? Mar 14, 2024 pm 08:50 PM

The edge browser comes with a translation function that allows users to translate anytime and anywhere, which brings great convenience to users. However, many users say that the built-in translation webpage is missing. Then the edge browser automatically What should I do if the translation page I brought is missing? Let this site introduce how to restore the translated web page that comes with the Edge browser if it is missing. How to restore the translation webpage that comes with the Edge browser is missing 1. Check whether the translation function is enabled: In the Edge browser, click the three dots icon in the upper right corner, and then select the "Settings" option. On the left side of the settings page, select the Language option. Make sure "Translate&rd"

Don't worry about watching movies without subtitles! Xiaomi announces the launch of Xiaoai Translation real-time subtitles for Japanese and Korean translation Don't worry about watching movies without subtitles! Xiaomi announces the launch of Xiaoai Translation real-time subtitles for Japanese and Korean translation Jul 22, 2024 pm 02:11 PM

According to news on July 22, today, the official Weibo of Xiaomi ThePaper OS announced that Xiaoai Translation has been upgraded. Real-time subtitles have been added to Japanese and Korean translations, and subtitle-free videos and live conferences can be transcribed and translated in real time. Face-to-face simultaneous interpretation supports translation into 12 languages, including Chinese, English, Japanese, Korean, Russian, Portuguese, Spanish, Italian, French, German, Indonesian, and Hindi. The above functions currently only support the following three new phones: Xiaomi MIX Fold 4 Xiaomi MIX Flip Redmi K70 Extreme Edition It is reported that in 2021, Xiao Ai’s AI subtitles will be added to Japanese and Korean translations. AI subtitles use Xiaomi’s self-developed simultaneous interpretation technology to provide a faster, more stable and accurate subtitle reading experience. 1. According to the official statement, Xiaoai Translator can not only be used in audio and video venues

How to translate Sogou browser How to translate Sogou browser Feb 01, 2024 am 11:09 AM

How does Sogou browser translate? When we usually use Sogou browser to check information, we will encounter some websites that are all in English. Because we can’t understand English, it is very difficult to browse the website. This is also very inconvenient. It doesn’t matter if you encounter this situation! Sogou Browser has a built-in translation button. With just one click, Sogou Browser will automatically translate the entire webpage for you? If you don’t know how to operate it, the editor has compiled the specific steps on how to translate it on Sogou Browser. If you don’t know how, follow me and read on! How to translate Sogou Browser 1. Open Sogou Browser, click the translation icon in the upper right corner 2. Select the type of translation text, and then enter the text that needs to be translated 3. Sogou Browser will automatically translate the text. At this point, the above Sogou Browsing operation is completed. How to translate all contents

In C/C++, the strcmp() function is used to compare two strings In C/C++, the strcmp() function is used to compare two strings Sep 10, 2023 am 11:41 AM

Thefunctionstrcmp()isabuilt-inlibraryfunctionanditisdeclaredin“string.h”headerfile.Thisfunctionisusedtocomparethestringarguments.Itcomparesstringslexicographicallywhichmeansitcomparesboththestringscharacterbycharacter.Itstartscomp

How to solve the problem that Google Chrome's built-in translation fails? How to solve the problem that Google Chrome's built-in translation fails? Mar 13, 2024 pm 08:46 PM

Browsers generally have built-in translation functions, so you don’t have to worry about not being able to understand when browsing foreign language websites! Google Chrome is no exception, but some users find that when they open the translation function of Google Chrome, there is no response or failure. What should they do? You can try the latest solution I found. Operation tutorial: Click the three dots in the upper right corner and click Settings. Click Add Language, add English and Chinese, and make the following settings for them. The English setting asks whether to translate web pages in this language. The Chinese setting displays web pages in this language, and Chinese must be moved to the top before it can be set as the default language. If you open the webpage and no translation option pops up, right-click and select Translate Chinese, OK.

Building a real-time translation tool based on JavaScript Building a real-time translation tool based on JavaScript Aug 09, 2023 pm 07:22 PM

Building a real-time translation tool based on JavaScript Introduction With the growing demand for globalization and the frequent occurrence of cross-border exchanges and exchanges, real-time translation tools have become a very important application. We can leverage JavaScript and some existing APIs to build a simple but useful real-time translation tool. This article will introduce how to implement this function based on JavaScript, with code examples. Implementation Steps Step 1: Create HTML Structure First, we need to create a simple HTML

Why can't Google Chrome translate Chinese? Why can't Google Chrome translate Chinese? Mar 11, 2024 pm 04:04 PM

Why can't Google Chrome translate Chinese? As we all know, Google Chrome is one of the browsers with built-in translation. When you browse pages written in other countries in this browser, the browser will automatically translate the page into Chinese. Recently, some users have said that they Chinese translation cannot be performed. At this time, we need to fix it in the settings. Next, the editor will bring you the solution to the problem that Google Chrome cannot translate into Chinese. Friends who are interested should come and take a look. Google Chrome cannot translate Chinese solutions 1. Modify the local hosts file. Hosts is a system file without an extension. It can be opened with tools such as Notepad. Its main function is to define the mapping relationship between IP addresses and host names. It is a mapping IP address

How to solve the problem that Sogou Browser cannot translate web pages How to solve the problem that Sogou Browser cannot translate web pages Jan 29, 2024 pm 09:18 PM

What should I do if Sogou Browser cannot translate this webpage? Sogou Browser is a very easy-to-use multi-functional browser. Its web page translation function is very powerful and can help us solve most of the troubles in study and work. However, some friends reported that Sogou Browser has a problem that it cannot translate this web page. This may be caused by improper operation. It can be solved by operating the translation function correctly. Below, the editor will bring you the problem that Sogou Browser cannot translate. Translate this page solution. Sogou Browser cannot translate this webpage Solution Method 1: 1. Download and install Sogou Browser 2. Open Sogou Browser 3. Open any English website 4. After the website is opened, click the translation icon in the upper right corner 5. Select Translate text type and click Translate current web page 6

See all articles