本文整理汇总了Python中FileUtils.replaceOstrWithNstr方法的典型用法代码示例。如果您正苦于以下问题:Python FileUtils.replaceOstrWithNstr方法的具体用法?Python FileUtils.replaceOstrWithNstr怎么用?Python FileUtils.replaceOstrWithNstr使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类FileUtils
的用法示例。
在下文中一共展示了FileUtils.replaceOstrWithNstr方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: replaceAllString
# 需要导入模块: import FileUtils [as 别名]
# 或者: from FileUtils import replaceOstrWithNstr [as 别名]
def replaceAllString():
Util.replaceOstrWithNstr(YSetting.DNS,YSetting.YOUTHDNS)
Util.replaceOstrWithNstr(YSetting.ctripBaoLeiIP,YSetting.youthBaoLeiIP)
Util.replaceOstrWithNstr(YSetting.ctripPaymentIP,YSetting.youthPaymentIP)
Util.replaceOstrWithNstr("ctrip://","ctripyouth://")
regexUtil.replaceFileStrWithRegex('(\s)*__dataSource.systemCode_\s=\[email protected]"[0-9]*;','__dataSource.systemCode_ = @"12";','AppDelegate.m')
regexUtil.replaceFileStrWithRegex('(\s)*#define kUBTAppID @"481001"','#define kUBTAppID @"481001"\n#define kCrittercismAppId @"538738311acb715292000001"','config.h')
regexUtil.replaceFileStrWithRegex('(\s)*\[self\s*initDataSource\];','[self initDataSource];\n[Crittercism enableWithAppID:kCrittercismAppId];','AppDelegate.m')#63
regexUtil.replaceFileStrWithRegex('(\s)*\[self\s*reloadRootViewControllers\];','[self reloadRootViewControllers];\n[[CTLocationManager sharedLocationManager] startLocatingWithDelegate:nil timeout:60 disableCache:YES needCtripCity:YES];','')#64
regexUtil.replaceFileStrWithRegex('NSString\*\s*scheme\s*=\s*\[\[url scheme\] lowercaseString\];','NSString* scheme = [[url scheme] lowercaseString];\nif([@"ctripyouth" isEqualToString:scheme]){\nscheme = @"ctrip";\n}','AppDelegate.m')#66
regexUtil.replaceFileStrWithRegex('NSString\s\*urlStr\s=\s*url\.absoluteString;','NSString *urlStr = url.absoluteString;\nurlStr = [urlStr stringByReplacingOccurrencesOfString:@"ctrip://" withString:@"ctripyouth://"];\n','CTDestinationURLDispatcher.m')
regexUtil.replaceFileStrWithRegex('if\s\(\[\[URL\.scheme\s*lowercaseString\]\s*isEqualToString\:kCtripWirelessUrlSchemeString\]\)','if ([[URL.scheme lowercaseString] isEqualToString:kCtripWirelessUrlSchemeString] || [[URL.scheme lowercaseString] isEqualToString:@"ctrip"])','CTURLDispatcher.m')
regexUtil.replaceFileStrWithRegex('','','')