首页 \ 问答 \ 如何从C中的字符串中删除标点符号(How to remove punctuation from a String in C)

如何从C中的字符串中删除标点符号(How to remove punctuation from a String in C)

我正在寻找从字符串中删除所有标点符号,并在C中使所有大写字母小写,任何建议?


I'm looking to remove all punctuation from a string and make all uppercase letters lower case in C, any suggestions?


原文:https://stackoverflow.com/questions/1841758
更新时间:2023-12-10 18:12

最满意答案

以下代码将生成您想要生成的正​​确的Authentication标头。

SOAPHeader header = request.getSOAPHeader();

Document doc = header.getOwnerDocument();

Element el1 = doc.createElementNS("http://abc.xyz.com/","UserName");
el1.setTextContent("MyName");

Element el2 = doc.createElementNS("http://abc.xyz.com/","Password");
el2.setTextContent("pass******");

Element el0 = doc.createElementNS("http://abc.xyz.com/", "AuthenticationHeader");

el0.appendChild(el1);
el0.appendChild(el2);
header.appendChild(el0);

Following code will generate the correct Authentication Header that you would like to generate.

SOAPHeader header = request.getSOAPHeader();

Document doc = header.getOwnerDocument();

Element el1 = doc.createElementNS("http://abc.xyz.com/","UserName");
el1.setTextContent("MyName");

Element el2 = doc.createElementNS("http://abc.xyz.com/","Password");
el2.setTextContent("pass******");

Element el0 = doc.createElementNS("http://abc.xyz.com/", "AuthenticationHeader");

el0.appendChild(el1);
el0.appendChild(el2);
header.appendChild(el0);

相关问答

更多
  • 两者都满足传递用户名和密码的功能需求。 两者都同样简单。 一个是开放标准 (实际上是一套经过深思熟虑的端到端SOAP消息安全需求标准中的一个小标准,包括身份验证,消息机密性,不可否认性等)。 另一个是特定于您的申请; 专有的,但可能就是你所需要的。 使用WS-Security的可能优势: 已经记录在案(更少为你工作。只记录你使用WS-Security UsernameToken ,客户可以谷歌其余的) 已实施 (为您的消费者减少工作量,甚至可能用于您的Web服务实施)。 许多库框架(Java:Apache ...
  • 根据评论,添加以下作为答案。 这与另一个解决方案完全不同。 这是第一个请求测试步骤的脚本断言 与其他解决方案不同,您不必定义元素名称 该脚本自动从第一个请求中读取标头,并创建元素名称及其值的映射 这也会读取下一个测试步骤请求,并将上述步骤映射数据作为标题添加到xml中 将更改xml更新为下一个测试步骤请求。 以下是脚本断言(对于第一个测试步骤):您也可以按照内嵌注释进行操作。 //Edit the name of the next test step name if required def nextSte ...
  • 得到它像这样工作: @Override public boolean handleMessage(SOAPMessageContext context) { try { SOAPMessage msg = context.getMessage(); SOAPPart part = msg.getSOAPPart(); SOAPEnvelope envelope = p ...
  • 我能够从SOAP :: Lite邮件列表中获得帮助。 如果我想传递自己的标题,我必须使用调用方法而不是实际的方法名称。 # create header for requests my $authHeader = SOAP::Header->name("xsd:authHeader" => \SOAP::Header->value( SOAP::Header->name('xsd:user')->value($s7user)->type(''), SOAP::Header->name(' ...
  • 以下代码将生成您想要生成的正确的Authentication标头。 SOAPHeader header = request.getSOAPHeader(); Document doc = header.getOwnerDocument(); Element el1 = doc.createElementNS("http://abc.xyz.com/","UserName"); el1.setTextContent("MyName"); Element el2 = doc.createElementNS ...
  • 您可以使用SoapHeader / SoapUnknownHeader扩展生成的代理: http://msdn.microsoft.com/en-us/library/whew6x7f.aspx http://msdn.microsoft.com/en-us/library/y4t36w86.aspx http://msdn.microsoft.com/en-us/library/system.web.services.protocols.soapheader.aspx 编辑 - 根据评论: 要包含自定义命 ...
  • 尝试这个 EndpointAddressBuilder endpointAddressBuilder = new EndpointAddressBuilder(proxy.Endpoint.Address); foreach (var item in headers) //headers is a Dictionary endpointAddressBuilder.Headers.Add( AddressHeader.Cre ...
  • UsernameToken的Oasis参考帮我填写了一些空白。 在这种情况下,第7,8,9页是最合适的。 特别是这些部分 / WSSE:用户名令牌/ WSSE:杜撰 此可选元素指定加密随机的随机数。 包含元素的每条消息必须使用新的nonce值,以便Web服务生产者检测重放攻击。 和 / WSSE:用户名令牌/ WSSE:杜撰/ @编码类型 此可选属性URI指定随机数的编码类型(有关有效值,请参阅的定义)。 如果未指定此属性,则使用默认的Base64编码。 ...
  • 尝试使用DOM 。 这是一种方式: $s = '
  • 我面临着类似的问题,这对我有用。 我使用wsimport生成了sei。 如果标头是wsdl的一部分,您可以使用-XadditionalHeaders生成接受标头的SEI。 如果不是,则必须使用SOAPHandler以编程方式添加标头。 虽然很简单! 这是一个详细描述的链接。 http://www.javadb.com/using-a-message-handler-to-alter-the-soap-header-in-a-web-service-client/ 更改方法, handleMessage如下 ...

相关文章

更多

最新问答

更多
  • 您如何使用git diff文件,并将其应用于同一存储库的副本的本地分支?(How do you take a git diff file, and apply it to a local branch that is a copy of the same repository?)
  • 将长浮点值剪切为2个小数点并复制到字符数组(Cut Long Float Value to 2 decimal points and copy to Character Array)
  • OctoberCMS侧边栏不呈现(OctoberCMS Sidebar not rendering)
  • 页面加载后对象是否有资格进行垃圾回收?(Are objects eligible for garbage collection after the page loads?)
  • codeigniter中的语言不能按预期工作(language in codeigniter doesn' t work as expected)
  • 在计算机拍照在哪里进入
  • 使用cin.get()从c ++中的输入流中丢弃不需要的字符(Using cin.get() to discard unwanted characters from the input stream in c++)
  • No for循环将在for循环中运行。(No for loop will run inside for loop. Testing for primes)
  • 单页应用程序:页面重新加载(Single Page Application: page reload)
  • 在循环中选择具有相似模式的列名称(Selecting Column Name With Similar Pattern in a Loop)
  • System.StackOverflow错误(System.StackOverflow error)
  • KnockoutJS未在嵌套模板上应用beforeRemove和afterAdd(KnockoutJS not applying beforeRemove and afterAdd on nested templates)
  • 散列包括方法和/或嵌套属性(Hash include methods and/or nested attributes)
  • android - 如何避免使用Samsung RFS文件系统延迟/冻结?(android - how to avoid lag/freezes with Samsung RFS filesystem?)
  • TensorFlow:基于索引列表创建新张量(TensorFlow: Create a new tensor based on list of indices)
  • 企业安全培训的各项内容
  • 错误:RPC失败;(error: RPC failed; curl transfer closed with outstanding read data remaining)
  • C#类名中允许哪些字符?(What characters are allowed in C# class name?)
  • NumPy:将int64值存储在np.array中并使用dtype float64并将其转换回整数是否安全?(NumPy: Is it safe to store an int64 value in an np.array with dtype float64 and later convert it back to integer?)
  • 注销后如何隐藏导航portlet?(How to hide navigation portlet after logout?)
  • 将多个行和可变行移动到列(moving multiple and variable rows to columns)
  • 提交表单时忽略基础href,而不使用Javascript(ignore base href when submitting form, without using Javascript)
  • 对setOnInfoWindowClickListener的意图(Intent on setOnInfoWindowClickListener)
  • Angular $资源不会改变方法(Angular $resource doesn't change method)
  • 在Angular 5中不是一个函数(is not a function in Angular 5)
  • 如何配置Composite C1以将.m和桌面作为同一站点提供服务(How to configure Composite C1 to serve .m and desktop as the same site)
  • 不适用:悬停在悬停时:在元素之前[复制](Don't apply :hover when hovering on :before element [duplicate])
  • 常见的python rpc和cli接口(Common python rpc and cli interface)
  • Mysql DB单个字段匹配多个其他字段(Mysql DB single field matching to multiple other fields)
  • 产品页面上的Magento Up出售对齐问题(Magento Up sell alignment issue on the products page)