答案 0 :(得分:0)
双引号在VBscript中使用字符串连接可能会很棘手。请注意,char(34)是ASCII等效项。
Ex:在VBScript中:func fbLogin(){
//firstly check whether system fb account available, if so use it
if SLComposeViewController.isAvailableForServiceType(SLServiceTypeFacebook){
fbLoginManger.loginBehavior = FBSDKLoginBehavior.SystemAccount
}
//then check whether fb app available, if so open it
else if UIApplication.sharedApplication().canOpenURL(NSURL(string: "fb://")!){
fbLoginManger.loginBehavior = FBSDKLoginBehavior.Native
}
//lastly, present a popup web inside app
else{
fbLoginManger.loginBehavior = FBSDKLoginBehavior.Web
}
fbLoginManger.logInWithReadPermissions(["public_profile"], fromViewController: self) { (result:FBSDKLoginManagerLoginResult!, error:NSError!) -> Void in
...
}
将输出“Some”String“
在您的情况下,您可以进行简单的替换:
chr(34) & "Some" & chr(34) & " String" & chr(34)
希望这有帮助。
答案 1 :(得分:0)
谢谢@JosefZ,我以这种方式解决了你的输入:strNewText = Replace(strText, "readback-rom-item readback-index=""0"" readback-enable=""false""", "readback-rom-item readback-index=""0"" readback-enable=""true""", 1, -1, vbTextCompare)