prefix和unprefix
exports._esModule = true;
exports.default = {
prefix: function prefix(prop){
if (prop[0] === '-'){
var sep = prop.indexOf('-' ,1 );
return prop.substr(0,sep+1);
} else {
return ' ';
}
},
unprefixed: function unprefixed(prop){
if (prop[0] === '-'){
var sep = prop.indexOf('-' ,1 );
return prop.substr(0,sep+1);
} else {
return prop;
}
}
};
prefix和unprefix的更多相关文章
- Spring配置文件标签报错:The prefix "XXX" for element "XXX:XXX" is not bound. .
例如:The prefix "context" for element "context:annotation-config" is not bound. 这种 ...
- [LeetCode] Implement Trie (Prefix Tree) 实现字典树(前缀树)
Implement a trie with insert, search, and startsWith methods. Note:You may assume that all inputs ar ...
- [LeetCode] Longest Common Prefix 最长共同前缀
Write a function to find the longest common prefix string amongst an array of strings. 这道题让我们求一系列字符串 ...
- 1014: [JSOI2008]火星人prefix
1014: [JSOI2008]火星人prefix Time Limit: 10 Sec Memory Limit: 162 MB Description 火星人最近研究了一种操作:求一个字串两个后缀 ...
- [BZOJ1014][JSOI2008]火星人prefix
[BZOJ1014][JSOI2008]火星人prefix 试题描述 火星人最近研究了一种操作:求一个字串两个后缀的公共前缀.比方说,有这样一个字符串:madamimadam,我们将这个字符串的各个字 ...
- No plugin found for prefix 'mybatis-generator' in the current project
http://blog.csdn.net/you23hai45/article/details/50792430 1.错误描述 F:\workspaces\Mybatis>mvn mybatis ...
- 【leetcode】Longest Common Prefix
题目简述: Write a function to find the longest common prefix string amongst an array of strings. 解题思路: c ...
- LintCode 78:Longest Common Prefix
public class Solution { /** * @param strs: A list of strings * @return: The longest common prefix ...
- [LintCode] Longest Common Prefix 最长共同前缀
Given k strings, find the longest common prefix (LCP). Have you met this question in a real intervie ...
随机推荐
- File类的基本操作之读出所有目录路径
package org.mark.file; import java.io.File; /** * File类的基本操作之读出所有文件夹路径 * 假设给定一个文件夹,要求将此文件夹中的所有文件都列出来 ...
- Python built-in函数的源码实现定位
http://blog.nsfocus.net/locate-python-built-in-function/
- [Effective C++ --016]成对使用New和Delete时要采用相同形式
这一节比较简单,可以总结为以下: std::string *stringPtr1 = new std::string; std::]; .. delete stringPtr1; // delete ...
- Socket之UDP发送文件
内容导航 一. Socket之UDP异步传输文件 二.Socket之UDP异步传输文件 三.Socket之UDP异步传输文件-多文件传输和文件MD5校验 四.Socket之UDP异步传输文件-用 ...
- Java ZIP File Example---refernce
In this tutorial we are going to see how to ZIP a file in Java. ZIP is an archive file format that e ...
- iOS 并发概念浅析
在进行iOS开发过程中,我们常会遇到网络请求.复杂计算.数据存取等比较耗时的操作,如果处理不合理,将对APP的流畅度产生较大影响.除了优化APP架构,并发(concurrency)是一个常用且较好的解 ...
- About xvfb
http://blog.csdn.net/span76/article/details/11473315 有时候我们不关注程序是否有界面(比如自动化测试),只要程序在运行就可以了 很感谢 xvfb 这 ...
- C语言里的文件函数
1.File *pf = fopen("文件名","打开方式"); 文件名可以加路径,两个"\\"或者一个"/" 打开方 ...
- C语言内存管理
作用域: 1.代码块儿作用域: 注意的是:这里面{}就代表一个代码块儿,里面的东西是独立的,不可被其他地方访问的. 2.函数作用域 3.文件作用域 先提一下 在当前有一个文件,main.c 还有一个文 ...
- Python基础:1.数据类型(元组)
提示:python版本为2.7,windows系统 1.元组(Tuple) Tuple,与List类似,但是Tuple一旦初始化之后就不能修改了,没有增加.删除.修改元素. >>> ...