# FastReplaceString
Fast native implementation in c(++) of a replace string script as an npm package.
Replaces a string in a file.
## Build status
| Platform | Status | Notes |
| --------- | --------- | ----- |
| Linux | [![Build status]( https://g.codefresh.io/api/badges/build?repoOwner=IwanKaramazow&repoName=FastReplaceString&branch=master&pipelineName=FastReplaceString&accountName=IwanKaramazow&type=cf-2)]( https://g.codefresh.io/repositories/IwanKaramazow/FastReplaceString/builds?filter=trigger:build;branch:master;service:58f675e124f7b201009db80c~FastReplaceString) | |
| MacOS | [![Build Status](https://travis-ci.org/IwanKaramazow/FastReplaceString.svg?branch=master)](https://travis-ci.org/IwanKaramazow/FastReplaceString) | |
| Windows | [![Build status](https://ci.appveyor.com/api/projects/status/4968wqmj8o1ktlu5?svg=true)](https://ci.appveyor.com/project/IwanKaramazow/fastreplacestring) | Use the precompiled binary available in .bin |
## Usage
```
fastreplacestring.exe filename src dest
```
* filename: filename to read
* src: string that will be replaced
* dest: replacement
## Example:
```
echo "let () = print_endline \"Hello worldð\";" > hello.re
fastreplacestring.exe hello.re worldð universeâï¸
cat hello.re
>>> let () = print_endline "Hello universeâï¸";
```
## Tests:
```
# everything
npm run test
# default tests
node ./tests/test.js
# cross compiling tests
node ./tests/xtest.js
```
## How to contribute:
* clone the repo
* add a new file under `./tests/input/yourFileName`
* add the expected file under `./tests/expected/yourFileName`
* add a command in `./tests/test.js` of form `filename src dest`, e.g. `yourFileName aString aReplacement`
* make changes to `fastreplacestring.cpp` & `npm run build`
* `npm run test`
## Notes on Cross-Compiling
Fastreplacestring.exe has been cross compiled from a Macbook Pro (13" intel i5 early 2015 macOS Sierra 10.12.5)
to the following platforms:
| OS | ARCH | Binary | CI available |
| -- | ---- | ----- | -- |
| Linux | 32 | fastreplacestring-linux32.exe | ð« |
| | 64 | fastreplacestring-linux64.exe | â
|
| Windows | 32 | fastreplacestring-win32.exe | â
|
| | 64 | fastreplacestring-win64.exe | ð« |
| Darwin | 32 | fastreplacestring-darwin32.exe | ð« |
| | 64 | fastreplacestring-darwin64.exe | â
|
All binaries are located in the `.bin` directory.
没有合适的资源?快使用搜索试试~ 我知道了~
C++和JavaScript实现的C文件快速字符串替换工具下载.zip
共37个文件
exe:7个
yml:3个
nothing:2个
需积分: 1 0 下载量 4 浏览量
2023-09-10
17:41:53
上传
评论
收藏 4.6MB ZIP 举报
温馨提示
C++和JavaScript实现的C文件快速字符串替换工具下载.zip
资源推荐
资源详情
资源评论
收起资源包目录
C++和JavaScript实现的C文件快速字符串替换工具下载.zip (37个子文件)
FastReplaceString-master
xcompile 758B
.travis.yml 367B
LICENSE 1KB
codefresh.yml 282B
tests
expected
no-perm 94B
lengthen 369B
basic 94B
multiple 74B
emoji 67B
ocamlopt 1.92MB
chinese 7B
nothing 59B
shorten 273B
input
no-perm 95B
lengthen 368B
basic 95B
multiple 56B
emoji 74B
ocamlopt 1.92MB
chinese 4B
nothing 59B
shorten 276B
xtest.js 3KB
test.js 3KB
package.json 1KB
Dockerfile 443B
fastreplacestring.cpp 4KB
test
.gitignore 25B
appveyor.yml 675B
README.md 2KB
.bin
fastreplacestring.exe 16KB
fastreplacestring-win64.exe 1.98MB
fastreplacestring-win32.exe 1.72MB
fastreplacestring-linux32.exe 1.61MB
fastreplacestring-darwin32.exe 1.6MB
fastreplacestring-linux64.exe 1.87MB
fastreplacestring-darwin64.exe 1.84MB
共 37 条
- 1
资源评论
m0_57781768
- 粉丝: 9907
- 资源: 402
上传资源 快速赚钱
- 我的内容管理 展开
- 我的资源 快来上传第一个资源
- 我的收益 登录查看自己的收益
- 我的积分 登录查看自己的积分
- 我的C币 登录后查看C币余额
- 我的收藏
- 我的下载
- 下载帮助
最新资源
- juhua-p8YYy-v0e13a7b5(1).apk
- Neo4j资源:Neo4j.rb的性能测试相关程序
- 排序算法之堆排序算法:用C++语言实现堆排序算法
- 基于Springboot的房屋租赁系统(源代码+论文+说明文档+PPT)-计算机专业精品毕业设计和课程设计
- leidian.py
- 直接插入排序算法:C语言实现直接插入排序算法
- 基于Springboot的大学生就业招聘系统(源代码+论文+说明文档+PPT)-计算机专业精品毕业设计和课程设计
- 基于Vue的H5结婚请帖前端设计源码
- saxaxasxasx
- 基于SSM++jsp的实验室耗材管理系统(源代码+论文+说明文档+PPT)-计算机专业精品毕业设计和课程设计
资源上传下载、课程学习等过程中有任何疑问或建议,欢迎提出宝贵意见哦~我们会及时处理!
点击此处反馈
安全验证
文档复制为VIP权益,开通VIP直接复制
信息提交成功