开发者

Escape Commands for " and \

开发者 https://www.devze.com 2023-02-14 09:42 出处:网络
I am trying to send a command that contains file path information in an NSString. The problem I am having is that backslashes used in my string are interpreted as unknown escape characters.

I am trying to send a command that contains file path information in an NSString. The problem I am having is that backslashes used in my string are interpreted as unknown escape characters.

Here is the line:

[myNetwork sendCommand:@"MMEM:STOR:DATA \"INT:\sum_sin.arb\"\n"];

I am receiving warnings about u开发者_JS百科nknown escape commands \s

Does anyone know of a work around?

Thanks, Hayden


Have you tried \ as escape character, so \\ for \ and \" for ".


You may want to try \\ for whenever you want to say \

0

精彩评论

暂无评论...
验证码 换一张
取 消