Code Monkey home page Code Monkey logo

lua-stringy's Introduction

stringy

fast string methods for: count, find, startswith, endswith, split.

version 0.3.2

lua-stringy's People

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar

lua-stringy's Issues

License please

Could a license please be attached with this so we can safely use it in a commercial project (or know not to) please?

Weird behaviour with http request

Could you help me? I want to use your stringy lib, but i don’t understand something. Here is a v string:

["header",["Content-Disposition","form-data; name="fileToUpload"; filename="Furi.docx"","Content-Disposition: form-data; name="fileToUpload"; filename="Furi.docx""]]

I want to strip filename, but for this expression:

stringy.split (v, "filename")[2]

i got

orm-data; name="

but i thought i need to get this:

="Furi.docx"","Content-Disposition: form-data; name="fileToUpload"; filename="Furi.docx""]]

What did/thought i wrong?

Thanks.

startswith(..) doesn't work with empty string

local stringy = require "stringy"

--  Doesn't work
print(stringy.startswith("hello", "")) -- Returns true!

I didn't test endswith but it might have the same bug.

Tested with stringy 0.4-1

install error

gcc -O2 -fPIC -I/usr/local/include -c stringy/stringy.c -o stringy/stringy.o -Istringy/
stringy/stringy.c: 在函数‘join’中:
stringy/stringy.c:182:5: 错误:只允许在 C99 模式下使用‘for’循环初始化声明
for (int i = 2; i <= top; ++i) {
^
stringy/stringy.c:182:5: 附注:使用 -std=c99 或 -std=gnu99 来编译您的代码

Error: Failed installing dependency: https://luarocks.org/stringy-0.7-0.src.rock - Build error: Failed compiling object stringy/stringy.o

Symbol not found: _fastsearch

I'm seeing this on luajit on El Capitan:

|| lua: error loading module 'stringy' from file '/Users/jdonaldson/env/lib/lua/5.1/stringy.so':
|| 	dlopen(/Users/jdonaldson/env/lib/lua/5.1/stringy.so, 6): Symbol not found: _fastsearch
||   Referenced from: /Users/jdonaldson/env/lib/lua/5.1/stringy.so
||   Expected in: flat namespace
||  in /Users/jdonaldson/env/lib/lua/5.1/stringy.so
|| stack traceback:
|| 	[C]: at 0x010006c150
|| 	[C]: in function 'require'
out.lua|54 info| in main chunk
|| 	[C]: at 0x0100001580
|| Error: Command failed with error 1

It works if I downgrade to 0.2-1 That was suggested by these related articles :
Kong/kong#213
Kong/kong#1736

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.